[trunk] WIP: fix bug with windows platform and j2k_dump
authorMickael Savinaud <savmickael@users.noreply.github.com>
Mon, 21 Nov 2011 17:18:33 +0000 (17:18 +0000)
committerMickael Savinaud <savmickael@users.noreply.github.com>
Mon, 21 Nov 2011 17:18:33 +0000 (17:18 +0000)
CHANGES
applications/codec/j2k_dump.c

diff --git a/CHANGES b/CHANGES
index 112bae1bb4cf5b16261d64f33fe2f653330ee71e..89ec382ddbc7d8065eb3777cf257b251ef4f0fb6 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -5,6 +5,9 @@ What's New for OpenJPEG
 ! : changed
 + : added
 
+November 21, 2011
+* [mickael] WIP: fix bug with windows platform and j2k_dump
+
 November 18, 2011
 * [mickael] WIP: fix bug with windows platform and j2k_to_image
 
index 86b1bc966be790c80bf67143ee35c523d28cae5b..887b18533970291e8c10b9f5c9648cf951e47fd0 100644 (file)
@@ -220,6 +220,7 @@ static int infile_format(const char *fname)
        const char *s, *magic_s;
        int ext_format, magic_format;
        unsigned char buf[12];
+       unsigned int l_nb_read; 
 
        reader = fopen(fname, "rb");
 
@@ -227,7 +228,7 @@ static int infile_format(const char *fname)
                return -1;
 
        memset(buf, 0, 12);
-       unsigned int l_nb_read = fread(buf, 1, 12, reader);
+       l_nb_read = fread(buf, 1, 12, reader);
        fclose(reader);
        if (l_nb_read != 12)
                return -1;