Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@kleisauke
Copy link
Member

Details
[1/40] Compiling C object libvips/foreign/libforeign.a.p/uhdrsave.c.o
../libvips/foreign/uhdrsave.c:289:11: warning: variable 'data' is used uninitialized whenever '&&' condition is false [-Wsometimes-uninitialized]
  289 |         else if (vips_image_get_typeof(image, "gainmap-data") &&
      |                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../libvips/foreign/uhdrsave.c:293:6: note: uninitialized use occurs here
  293 |         if (data) {
      |             ^~~~
../libvips/foreign/uhdrsave.c:289:11: note: remove the '&&' if its condition is always true
  289 |         else if (vips_image_get_typeof(image, "gainmap-data") &&
      |                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../libvips/foreign/uhdrsave.c:270:18: note: initialize the variable 'data' to silence this warning
  270 |         const void *data;
      |                         ^
      |                          = NULL
1 warning generated.

@jcupitt jcupitt merged commit 92bddca into libvips:master Nov 14, 2025
7 checks passed
@jcupitt
Copy link
Member

jcupitt commented Nov 14, 2025

👍

@kleisauke kleisauke deleted the silence-gcc-warn branch November 15, 2025 08:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants