app: silence warning in gimpimage-convert-indexed

We had the following warning:
In function 'make_remap_table',
    inlined from 'gimp_image_convert_indexed' at
  ../../gimp/app/core/gimpimage-convert-indexed.c:1057:7:
D:/msys64/mingw64/include/glib-2.0/glib/gmem.h:261:19: warning: argument 1
 range [18446744071562067968, 18446744073709551615] exceeds maximum object
 size 9223372036854775807 [-Walloc-size-larger-than=]

This is apparently caused by inlining in combination with using a signed
int.
See also: https://gcc.gnu.org/bugzilla//show_bug.cgi?id=85783

Casting to (guint) silences the warning here.
This commit is contained in:
Jacob Boerema 2023-06-27 14:15:34 -04:00
parent 0c453edc78
commit f65d8e8730
1 changed files with 1 additions and 1 deletions

View File

@ -636,7 +636,7 @@ make_remap_table (const guchar old_palette[],
/* Third pass - rank all used indices to the beginning of the
* palette.
*/
palentries = g_new (PalEntry, used);
palentries = g_new (PalEntry, (guint) used);
for (i = 0; i < used; i++)
{