From b1d8788a464e0de986eabab0fb22c8d857b89c78 Mon Sep 17 00:00:00 2001 From: Antonin Descampe Date: Thu, 10 Sep 2009 13:10:09 +0000 Subject: [PATCH] fixed minor bugs which were triggering warnings at compilation (different signedness, wrong pointer type, etc) --- ChangeLog | 3 +++ codec/convert.c | 2 +- codec/index.c | 2 +- openjpeg.xcodeproj/project.pbxproj | 4 ++-- 4 files changed, 7 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index d0c312d1..641636f4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -5,6 +5,9 @@ What's New for OpenJPEG ! : changed + : added +September 10, 2009 +* [antonin] fixed minor bugs which were triggering warnings at compilation (different signedness, wrong pointer type, etc) + August 2nd, 2008 * [Mathieu Malaterre] remove INLINE from forward decl. Fix CMakeLists.txt for UNIX platforms diff --git a/codec/convert.c b/codec/convert.c index 4572d7e5..ada2af08 100644 --- a/codec/convert.c +++ b/codec/convert.c @@ -99,7 +99,7 @@ typedef struct tga_header } tga_header; #pragma pack(pop) // Return to normal structure packing alignment. -int tga_readheader(FILE *fp, int *bits_per_pixel, int *width, int *height, int *flip_image) +int tga_readheader(FILE *fp, uint32 *bits_per_pixel, uint32 *width, uint32 *height, int *flip_image) { int palette_size; tga_header tga ; diff --git a/codec/index.c b/codec/index.c index 2e0283dd..873b3403 100644 --- a/codec/index.c +++ b/codec/index.c @@ -79,7 +79,7 @@ int write_index_file(opj_codestream_info_t *cstr_info, char *index) { fprintf(stream, "%d %d\n", cstr_info->tw, cstr_info->th); fprintf(stream, "%d\n", cstr_info->numcomps); fprintf(stream, "%d\n", cstr_info->numlayers); - fprintf(stream, "%d\n", cstr_info->numdecompos); + fprintf(stream, "%d\n", cstr_info->numdecompos[0]); /* based on component 0 */ for (resno = cstr_info->numdecompos[0]; resno >= 0; resno--) { fprintf(stream, "[%d,%d] ", diff --git a/openjpeg.xcodeproj/project.pbxproj b/openjpeg.xcodeproj/project.pbxproj index d80602cc..41e4490b 100644 --- a/openjpeg.xcodeproj/project.pbxproj +++ b/openjpeg.xcodeproj/project.pbxproj @@ -274,8 +274,8 @@ 69803D3F0E433E5C00A62250 /* CMakeLists.txt */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = text; path = CMakeLists.txt; sourceTree = ""; }; 69803D400E433E5C00A62250 /* test_decoder.c */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = sourcecode.c.c; path = test_decoder.c; sourceTree = ""; }; 69803D410E433E5C00A62250 /* test_encoder.c */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = sourcecode.c.c; path = test_encoder.c; sourceTree = ""; }; - 69803D8F0E43401100A62250 /* test_encoder */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; name = test_encoder; path = build/Release/test_encoder; sourceTree = ""; }; - 69803DAA0E43406A00A62250 /* test_decoder */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; name = test_decoder; path = build/Release/test_decoder; sourceTree = ""; }; + 69803D8F0E43401100A62250 /* test_encoder */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = test_encoder; sourceTree = BUILT_PRODUCTS_DIR; }; + 69803DAA0E43406A00A62250 /* test_decoder */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = test_decoder; sourceTree = BUILT_PRODUCTS_DIR; }; 69F985A10D40A48E00C2791C /* libopenjpeg.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libopenjpeg.a; sourceTree = BUILT_PRODUCTS_DIR; }; 69F985B60D40A63D00C2791C /* libopenjpeg.dylib */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.dylib"; includeInIndex = 0; path = libopenjpeg.dylib; sourceTree = BUILT_PRODUCTS_DIR; }; 69F986390D40A7DA00C2791C /* image_to_j2k */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = image_to_j2k; sourceTree = BUILT_PRODUCTS_DIR; };