2.4.120: [-Wincompatible-pointer-types] rurned into errors
With new gcc 14.x and glibc -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3
in $CFLAGS build changes [-Wincompatible-pointer-types]
warnings into errors
[tkloczko@pers-jacek x86_64-redhat-linux-gnu]$ ninja -k 0
[1/2] Compiling C object tests/amdgpu/amdgpu_test.p/shader_test_util.c.o
FAILED: tests/amdgpu/amdgpu_test.p/shader_test_util.c.o
/usr/bin/gcc -Itests/amdgpu/amdgpu_test.p -Itests/amdgpu -I../tests/amdgpu -I. -I.. -I../include/drm -Iamdgpu -I../amdgpu -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -std=c11 -include config.h -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -O2 -g -grecord-gcc-switches -pipe -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -fdata-sections -ffunction-sections -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -flto=auto -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -Wall -Werror=format-security -pthread -MD -MQ tests/amdgpu/amdgpu_test.p/shader_test_util.c.o -MF tests/amdgpu/amdgpu_test.p/shader_test_util.c.o.d -o tests/amdgpu/amdgpu_test.p/shader_test_util.c.o -c ../tests/amdgpu/shader_test_util.c
In file included from ../tests/amdgpu/shader_test_util.c:10:
../tests/amdgpu/shader_code.h:114:9: error: initialization of ‘const uint32_t *’ {aka ‘const unsigned int *’} from incompatible pointer type ‘const uint32_t (*)[10][6]’ {aka ‘const unsigned int (*)[10][6]’} [-Wincompatible-pointer-types]
114 | ps_##_ps##_shader_patchinfo_code_gfx##_n, \
| ^~~
../tests/amdgpu/shader_code.h:119:10: note: in expansion of macro ‘SHADER_PS_INFO’
119 | {SHADER_PS_INFO(const, 9), SHADER_PS_INFO(tex, 9)},
| ^~~~~~~~~~~~~~
../tests/amdgpu/shader_code.h:114:9: note: (near initialization for ‘shader_test_ps[0][0].patchinfo_code’)
114 | ps_##_ps##_shader_patchinfo_code_gfx##_n, \
| ^~~
../tests/amdgpu/shader_code.h:119:10: note: in expansion of macro ‘SHADER_PS_INFO’
119 | {SHADER_PS_INFO(const, 9), SHADER_PS_INFO(tex, 9)},
| ^~~~~~~~~~~~~~
../tests/amdgpu/shader_code.h:114:9: error: initialization of ‘const uint32_t *’ {aka ‘const unsigned int *’} from incompatible pointer type ‘const uint32_t (*)[10][6]’ {aka ‘const unsigned int (*)[10][6]’} [-Wincompatible-pointer-types]
114 | ps_##_ps##_shader_patchinfo_code_gfx##_n, \
| ^~~
../tests/amdgpu/shader_code.h:119:36: note: in expansion of macro ‘SHADER_PS_INFO’
119 | {SHADER_PS_INFO(const, 9), SHADER_PS_INFO(tex, 9)},
| ^~~~~~~~~~~~~~
../tests/amdgpu/shader_code.h:114:9: note: (near initialization for ‘shader_test_ps[0][1].patchinfo_code’)
114 | ps_##_ps##_shader_patchinfo_code_gfx##_n, \
| ^~~
../tests/amdgpu/shader_code.h:119:36: note: in expansion of macro ‘SHADER_PS_INFO’
119 | {SHADER_PS_INFO(const, 9), SHADER_PS_INFO(tex, 9)},
| ^~~~~~~~~~~~~~
../tests/amdgpu/shader_code.h:114:9: error: initialization of ‘const uint32_t *’ {aka ‘const unsigned int *’} from incompatible pointer type ‘const uint32_t (*)[10][6]’ {aka ‘const unsigned int (*)[10][6]’} [-Wincompatible-pointer-types]
114 | ps_##_ps##_shader_patchinfo_code_gfx##_n, \
| ^~~
../tests/amdgpu/shader_code.h:120:10: note: in expansion of macro ‘SHADER_PS_INFO’
120 | {SHADER_PS_INFO(const, 10), SHADER_PS_INFO(tex, 10)},
| ^~~~~~~~~~~~~~
../tests/amdgpu/shader_code.h:114:9: note: (near initialization for ‘shader_test_ps[1][0].patchinfo_code’)
114 | ps_##_ps##_shader_patchinfo_code_gfx##_n, \
| ^~~
../tests/amdgpu/shader_code.h:120:10: note: in expansion of macro ‘SHADER_PS_INFO’
120 | {SHADER_PS_INFO(const, 10), SHADER_PS_INFO(tex, 10)},
| ^~~~~~~~~~~~~~
../tests/amdgpu/shader_code.h:114:9: error: initialization of ‘const uint32_t *’ {aka ‘const unsigned int *’} from incompatible pointer type ‘const uint32_t (*)[10][6]’ {aka ‘const unsigned int (*)[10][6]’} [-Wincompatible-pointer-types]
114 | ps_##_ps##_shader_patchinfo_code_gfx##_n, \
| ^~~
../tests/amdgpu/shader_code.h:120:37: note: in expansion of macro ‘SHADER_PS_INFO’
120 | {SHADER_PS_INFO(const, 10), SHADER_PS_INFO(tex, 10)},
| ^~~~~~~~~~~~~~
../tests/amdgpu/shader_code.h:114:9: note: (near initialization for ‘shader_test_ps[1][1].patchinfo_code’)
114 | ps_##_ps##_shader_patchinfo_code_gfx##_n, \
| ^~~
../tests/amdgpu/shader_code.h:120:37: note: in expansion of macro ‘SHADER_PS_INFO’
120 | {SHADER_PS_INFO(const, 10), SHADER_PS_INFO(tex, 10)},
| ^~~~~~~~~~~~~~
../tests/amdgpu/shader_code.h:114:9: error: initialization of ‘const uint32_t *’ {aka ‘const unsigned int *’} from incompatible pointer type ‘const uint32_t (*)[10][6]’ {aka ‘const unsigned int (*)[10][6]’} [-Wincompatible-pointer-types]
114 | ps_##_ps##_shader_patchinfo_code_gfx##_n, \
| ^~~
../tests/amdgpu/shader_code.h:121:10: note: in expansion of macro ‘SHADER_PS_INFO’
121 | {SHADER_PS_INFO(const, 11), SHADER_PS_INFO(tex, 11)},
| ^~~~~~~~~~~~~~
../tests/amdgpu/shader_code.h:114:9: note: (near initialization for ‘shader_test_ps[2][0].patchinfo_code’)
114 | ps_##_ps##_shader_patchinfo_code_gfx##_n, \
| ^~~
../tests/amdgpu/shader_code.h:121:10: note: in expansion of macro ‘SHADER_PS_INFO’
121 | {SHADER_PS_INFO(const, 11), SHADER_PS_INFO(tex, 11)},
| ^~~~~~~~~~~~~~
../tests/amdgpu/shader_code.h:114:9: error: initialization of ‘const uint32_t *’ {aka ‘const unsigned int *’} from incompatible pointer type ‘const uint32_t (*)[10][6]’ {aka ‘const unsigned int (*)[10][6]’} [-Wincompatible-pointer-types]
114 | ps_##_ps##_shader_patchinfo_code_gfx##_n, \
| ^~~
../tests/amdgpu/shader_code.h:121:37: note: in expansion of macro ‘SHADER_PS_INFO’
121 | {SHADER_PS_INFO(const, 11), SHADER_PS_INFO(tex, 11)},
| ^~~~~~~~~~~~~~
../tests/amdgpu/shader_code.h:114:9: note: (near initialization for ‘shader_test_ps[2][1].patchinfo_code’)
114 | ps_##_ps##_shader_patchinfo_code_gfx##_n, \
| ^~~
../tests/amdgpu/shader_code.h:121:37: note: in expansion of macro ‘SHADER_PS_INFO’
121 | {SHADER_PS_INFO(const, 11), SHADER_PS_INFO(tex, 11)},
| ^~~~~~~~~~~~~~
../tests/amdgpu/shader_test_util.c: In function ‘amdgpu_dispatch_init’:
../tests/amdgpu/shader_test_util.c:296:9: warning: enumeration value ‘AMDGPU_TEST_GFX_MAX’ not handled in switch [-Wswitch]
296 | switch (test_priv->info->version) {
| ^~~~~~
../tests/amdgpu/shader_test_util.c: In function ‘amdgpu_dispatch_write_cumask’:
../tests/amdgpu/shader_test_util.c:315:9: warning: enumeration value ‘AMDGPU_TEST_GFX_MAX’ not handled in switch [-Wswitch]
315 | switch (test_priv->info->version) {
| ^~~~~~
../tests/amdgpu/shader_test_util.c: In function ‘amdgpu_dispatch_write2hw’:
../tests/amdgpu/shader_test_util.c:534:9: warning: enumeration value ‘AMDGPU_TEST_GFX_MAX’ not handled in switch [-Wswitch]
534 | switch (test_priv->info->version) {
| ^~~~~~
../tests/amdgpu/shader_test_util.c: In function ‘amdgpu_draw_setup_and_write_drawblt_surf_info’:
../tests/amdgpu/shader_test_util.c:1161:9: warning: enumeration value ‘AMDGPU_TEST_GFX_MAX’ not handled in switch [-Wswitch]
1161 | switch (test_priv->info->version) {
| ^~~~~~
../tests/amdgpu/shader_test_util.c: In function ‘amdgpu_draw_setup_and_write_drawblt_state’:
../tests/amdgpu/shader_test_util.c:1291:9: warning: enumeration value ‘AMDGPU_TEST_GFX_MAX’ not handled in switch [-Wswitch]
1291 | switch (test_priv->info->version) {
| ^~~~~~
../tests/amdgpu/shader_test_util.c: In function ‘amdgpu_draw_vs_RectPosTexFast_write2hw’:
../tests/amdgpu/shader_test_util.c:1539:9: warning: enumeration value ‘AMDGPU_TEST_GFX_MAX’ not handled in switch [-Wswitch]
1539 | switch (test_priv->info->version) {
| ^~~~~~
../tests/amdgpu/shader_test_util.c: In function ‘amdgpu_draw_ps_write2hw’:
../tests/amdgpu/shader_test_util.c:1674:9: warning: enumeration value ‘AMDGPU_TEST_GFX_MAX’ not handled in switch [-Wswitch]
1674 | switch (test_priv->info->version) {
| ^~~~~~
../tests/amdgpu/shader_test_util.c: In function ‘amdgpu_draw_draw’:
../tests/amdgpu/shader_test_util.c:1690:9: warning: enumeration value ‘AMDGPU_TEST_GFX_MAX’ not handled in switch [-Wswitch]
1690 | switch (test_priv->info->version) {
| ^~~~~~
../tests/amdgpu/shader_test_util.c: In function ‘amdgpu_memcpy_draw_test’:
../tests/amdgpu/shader_test_util.c:1983:9: warning: enumeration value ‘AMDGPU_TEST_GFX_MAX’ not handled in switch [-Wswitch]
1983 | switch (test_info->version) {
| ^~~~~~
ninja: build stopped: cannot make progress due to previous errors.