Several "maybe uninitialized" warnings in new source src/image_sixel.c

3 views
Skip to first unread message

Tony Mechelynck

unread,
Sep 30, 2026, 7:09:47 PM (16 hours ago) Sep 30
to Christian Brabandt, vim_dev
In Huge or Big with GTK3, not in Tiny with Motif or with no GUI:

image_sixel.c: In function ‘image_placement_sixel_draw’:
image_sixel.c:860:29: warning: ‘view.idx’ may be used uninitialized
[-Wmaybe-uninitialized]
860 | sixel_view_T view;
| ^~~~
image_sixel.c:860:29: warning: ‘view.stride’ may be used uninitialized
[-Wmaybe-uninitialized]
In function ‘sixel_encode_view’,
inlined from ‘image_placement_sixel_draw’ at image_sixel.c:905:6:
image_sixel.c:636:16: warning: ‘view.width’ may be used uninitialized
[-Wmaybe-uninitialized]
636 | || ga_concat_int(&hdr, width) == FAIL
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
image_sixel.c: In function ‘image_placement_sixel_draw’:
image_sixel.c:860:29: note: ‘view.width’ was declared here
860 | sixel_view_T view;
| ^~~~
In function ‘sixel_encode_view’,
inlined from ‘image_placement_sixel_draw’ at image_sixel.c:905:6:
image_sixel.c:638:16: warning: ‘view.height’ may be used uninitialized
[-Wmaybe-uninitialized]
638 | || ga_concat_int(&hdr, height) == FAIL)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
image_sixel.c: In function ‘image_placement_sixel_draw’:
image_sixel.c:860:29: note: ‘view.height’ was declared here
860 | sixel_view_T view;
| ^~~~
In function ‘sixel_encode_view’,
inlined from ‘image_placement_sixel_draw’ at image_sixel.c:905:6:
image_sixel.c:723:29: warning: ‘view.pal’ may be used uninitialized
[-Wmaybe-uninitialized]
723 | int b = (pal[(pix - 1) * 3 + 2] * 100 + 127) / 255;
| ^
image_sixel.c: In function ‘image_placement_sixel_draw’:
image_sixel.c:860:29: note: ‘view.pal’ was declared here
860 | sixel_view_T view;
| ^~~~
In function ‘sixel_ensure_band_capacity’,
inlined from ‘sixel_encode_view’ at image_sixel.c:645:9,
inlined from ‘image_placement_sixel_draw’ at image_sixel.c:905:6:
image_sixel.c:257:55: warning: ‘view.npal’ may be used uninitialized
[-Wmaybe-uninitialized]
257 | size_t bits_need = (size_t)width * (npal + 1);
| ~~~~~~^~~~
image_sixel.c: In function ‘image_placement_sixel_draw’:
image_sixel.c:860:29: note: ‘view.npal’ was declared here
860 | sixel_view_T view;
| ^~~~

Best regards,
Tony.
Reply all
Reply to author
Forward
0 new messages