Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix shift-negative-value warning and reenable warning #785

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -324,18 +324,12 @@ add_compile_options(
-Wno-pointer-integer-compare
-Wno-unknown-pragmas
-Wno-pointer-sign
<<<<<<< HEAD
-Wno-constant-conversion
-Wno-tautological-pointer-compare
=======
>>>>>>> 66015f0470 (Re-enable warnings)
-Wno-deprecated-declarations
-Wno-pointer-to-int-cast
-Wno-compare-distinct-pointer-types
-Wno-conditional-type-mismatch
-Wno-return-type
-Wno-unused-local-typedef
-Wno-shift-negative-value
-Wno-unknown-warning-option
)

Expand Down
10 changes: 5 additions & 5 deletions extracted/plugins/JPEGReadWriter2Plugin/src/common/jdhuff.c
Original file line number Diff line number Diff line change
Expand Up @@ -440,7 +440,7 @@ jpeg_huff_decode (bitread_working_state * state,

#ifdef AVOID_TABLES

#define HUFF_EXTEND(x,s) ((x) < (1<<((s)-1)) ? (x) + (((-1)<<(s)) + 1) : (x))
#define HUFF_EXTEND(x,s) ((x) < (1<<((s)-1)) ? (x) + ((((unsigned int)(-1))<<(s)) + 1) : (x))

#else

Expand All @@ -451,10 +451,10 @@ static const int extend_test[16] = /* entry n is 2**(n-1) */
0x0100, 0x0200, 0x0400, 0x0800, 0x1000, 0x2000, 0x4000 };

static const int extend_offset[16] = /* entry n is (-1 << n) + 1 */
{ 0, ((-1)<<1) + 1, ((-1)<<2) + 1, ((-1)<<3) + 1, ((-1)<<4) + 1,
((-1)<<5) + 1, ((-1)<<6) + 1, ((-1)<<7) + 1, ((-1)<<8) + 1,
((-1)<<9) + 1, ((-1)<<10) + 1, ((-1)<<11) + 1, ((-1)<<12) + 1,
((-1)<<13) + 1, ((-1)<<14) + 1, ((-1)<<15) + 1 };
{ 0, (((unsigned int)(-1))<<1) + 1, (((unsigned int)(-1))<<2) + 1, (((unsigned int)(-1))<<3) + 1, (((unsigned int)(-1))<<4) + 1,
(((unsigned int)(-1))<<5) + 1, (((unsigned int)(-1))<<6) + 1, (((unsigned int)(-1))<<7) + 1, (((unsigned int)(-1))<<8) + 1,
(((unsigned int)(-1))<<9) + 1, (((unsigned int)(-1))<<10) + 1, (((unsigned int)(-1))<<11) + 1, (((unsigned int)(-1))<<12) + 1,
(((unsigned int)(-1))<<13) + 1, (((unsigned int)(-1))<<14) + 1, (((unsigned int)(-1))<<15) + 1 };

#endif /* AVOID_TABLES */

Expand Down