In file included from ../include/private/vkd3d_memory.h:27, з ../libs/vkd3d-shader/vkd3d_shader_private.h:50, з ../libs/vkd3d-shader/dxbc.c:20: ../libs/vkd3d-shader/dxbc.c: In function ‘shader_sm4_read_param’: ../include/private/vkd3d_debug.h:71:9: warning: this statement may fall through [-Wimplicit-fallthrough=] 71 | vkd3d_dbg_printf(vkd3d_dbg_level, __FUNCTION__, __VA_ARGS__); } while (0) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../include/private/vkd3d_debug.h:60:9: note: in expansion of macro ‘VKD3D_DBG_PRINTF’ 60 | VKD3D_DBG_PRINTF | ^~~~~~~~~~~~~~~~ ../include/private/vkd3d_debug.h:82:15: note: in expansion of macro ‘VKD3D_DBG_LOG’ 82 | #define FIXME VKD3D_DBG_LOG(FIXME) | ^~~~~~~~~~~~~ ../libs/vkd3d-shader/dxbc.c:1553:17: note: in expansion of macro ‘FIXME’ 1553 | FIXME("Skipping modifier 0x%08x.\n", m); | ^~~~~ ../libs/vkd3d-shader/dxbc.c:1554:13: note: here 1554 | case VKD3D_SM4_REGISTER_MODIFIER_NONE: | ^~~~
Signed-off-by: Andrey Gusev andrey.goosev@gmail.com --- libs/vkd3d-shader/dxbc.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/libs/vkd3d-shader/dxbc.c b/libs/vkd3d-shader/dxbc.c index bfc3cce..89868bd 100644 --- a/libs/vkd3d-shader/dxbc.c +++ b/libs/vkd3d-shader/dxbc.c @@ -1549,11 +1549,12 @@ static bool shader_sm4_read_param(struct vkd3d_sm4_data *priv, const DWORD **ptr *modifier = VKD3DSPSM_ABSNEG; break;
- default: - FIXME("Skipping modifier 0x%08x.\n", m); case VKD3D_SM4_REGISTER_MODIFIER_NONE: *modifier = VKD3DSPSM_NONE; break; + + default: + FIXME("Skipping modifier 0x%08x.\n", m); } } else
On Sat, 20 Feb 2021 14:22:51 +0200 Andrey Gusev andrey.goosev@gmail.com wrote:
This changes behavior (*modifier is not being set anymore). A better way to silence the warning may be to annotate the fall-through, like this:
default: FIXME("Skipping modifier 0x%08x.\n", m); /* fall-through */ case VKD3D_SM4_REGISTER_MODIFIER_NONE: *modifier = VKD3DSPSM_NONE; break;
(at least in my experience, GCC and Clang recognize a comment like that and suppress the implicit fall through warning).