Skip to content

Commit 38c919f

Browse files
committed
Eliminate warnings from GCC when using maximal compiler warning levels
1 parent 65d46ae commit 38c919f

4 files changed

Lines changed: 13 additions & 2 deletions

File tree

ChangeLog

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
28/12/2025:
2+
- Eliminate warnings from GCC when using maximal compiler warning levels
3+
4+
15
22/12/2025:
26
- Update OpenJPEG and Kakadu decoders to store real resolution sizes rather than try to mimic TIFF.
37
View::getResolution() also updated to take a vector of existing resolution sizes to determine resolution

src/KakaduImage.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,16 @@
3434

3535
#include "IIPImage.h"
3636

37+
// Eliminate gcc compiler warnings caused by Kakadu library
38+
#pragma GCC diagnostic push
39+
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
40+
#pragma GCC diagnostic ignored "-Wdeprecated-copy"
41+
#pragma GCC diagnostic ignored "-Wctor-dtor-privacy"
42+
#pragma GCC diagnostic ignored "-Woverloaded-virtual="
3743
#include <jpx.h>
3844
#include <jp2.h>
3945
#include <kdu_stripe_decompressor.h>
46+
#pragma GCC diagnostic pop
4047
#include <fstream>
4148

4249
#define TILESIZE 256

src/View.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ void View::calculateResolution( const std::vector<unsigned int>& dimensions,
3333
unsigned int rs = (requested_size<min_size) ? min_size : requested_size;
3434

3535
// Find the resolution level closest but higher than the requested size
36-
for( j=0; j<max_resolutions; j++ ){
36+
for( j=0; j<(int)max_resolutions; j++ ){
3737
if( dimensions[j] < rs ) break;
3838
}
3939

src/Writer.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ class FileWriter {
166166
@return number of bytes written
167167
*/
168168
int putStr( const char* msg, int len ){
169-
return fwrite( (void*) msg, sizeof(char), len, out );
169+
return fwrite( (const void*) msg, sizeof(char), len, out );
170170
};
171171

172172
/// Write out a string using puts()

0 commit comments

Comments
 (0)