jpeg: Silence -Wshift-negative-value warnings

These are all from upstream code, so just force-ignore the warnings

Change-Id: I9936e1cb79636b0bfee5dd4db0c98a06792d2f69
This commit is contained in:
Solomon Peachy 2025-04-22 09:43:40 -04:00
parent 9e52dcc7e7
commit 6f5760b41a
3 changed files with 17 additions and 0 deletions

View file

@ -1081,6 +1081,11 @@ static const int extend_test[16] = /* entry n is 2**(n-1) */
0x0100, 0x0200, 0x0400, 0x0800, 0x1000, 0x2000, 0x4000
};
#if (__GNUC__ >= 6)
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wshift-negative-value"
#endif
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,
@ -1088,6 +1093,9 @@ static const int extend_offset[16] = /* entry n is (-1 << n) + 1 */
((-1)<<9) + 1, ((-1)<<10) + 1, ((-1)<<11) + 1, ((-1)<<12) + 1,
((-1)<<13) + 1, ((-1)<<14) + 1, ((-1)<<15) + 1
};
#if (__GNUC__ >= 6)
#pragma GCC diagnostic pop
#endif
/* Decode a single value */
INLINE int huff_decode_dc(struct bitstream* bs, struct derived_tbl* tbl)

View file

@ -46,6 +46,10 @@ jpeg81.c
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wunused-parameter"
#if (__GNUC__ >= 6)
#pragma GCC diagnostic ignored "-Wshift-negative-value"
#endif
///////////////////////////////////////// LOSSLESS /////////////////////////////////////////
static int P1(struct COMP *C, TSAMP *samp) // Px = Ra

View file

@ -43,6 +43,11 @@
#define JDEBUGF(...)
#endif
#if (__GNUC__ >= 6)
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wshift-negative-value"
#endif
/**************** begin JPEG code ********************/
#ifdef HAVE_LCD_COLOR