Skip to content

vkd3d-shader/ir: Two minor fixes.

1/2 updates an obsolete comment.

2/2 replaces a use of memset() with a zero value assignment, because, for me, the following warning appears during compilation with gcc 15.1.1 20250425:

  In function 'vsir_block_list_init',
      inlined from 'vsir_block_init' at vkd3d/libs/vkd3d-shader/ir.c:3821:5,
      inlined from 'vsir_cfg_init' at vkd3d/libs/vkd3d-shader/ir.c:4285:28:
  vkd3d/libs/vkd3d-shader/ir.c:3758:5: warning: 'memset' writing 24 bytes into a region of size 0 overflows the destination [-Wstringop-overflow=]
   3758 |     memset(list, 0, sizeof(*list));
        |     ^
  In function 'vsir_cfg_init':
  lto1: note: destination object is likely at address zero

looking at the code in vsir_cfg_init() this seems like an spurious warning. Looking on the internet, these bogus warnings with memset() seem to be a common occurrence.

Edited by Francisco Casas

Merge request reports

Loading