From 7d3b2aebfd38edfda3b4c047294cc7bc0aa2b1ee Mon Sep 17 00:00:00 2001 From: akallabeth Date: Fri, 30 Aug 2024 14:22:37 +0200 Subject: [PATCH] [warnings] silence WINPR_FALLTHROGH --- libfreerdp/codec/dsp.c | 2 ++ winpr/include/config/wtypes.h.in | 8 ++++---- winpr/libwinpr/sspi/Kerberos/kerberos.c | 2 +- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/libfreerdp/codec/dsp.c b/libfreerdp/codec/dsp.c index 24fe6294c..a4f34322e 100644 --- a/libfreerdp/codec/dsp.c +++ b/libfreerdp/codec/dsp.c @@ -1435,10 +1435,12 @@ BOOL freerdp_dsp_supports_format(const AUDIO_FORMAT* WINPR_RESTRICT format, BOOL #endif #if defined(WITH_OPUS) + /* fallthrough */ WINPR_FALLTHROUGH case WAVE_FORMAT_OPUS: return opus_is_valid_samplerate(format); #endif + /* fallthrough */ WINPR_FALLTHROUGH default: return FALSE; diff --git a/winpr/include/config/wtypes.h.in b/winpr/include/config/wtypes.h.in index 14869d81c..24a373ac9 100644 --- a/winpr/include/config/wtypes.h.in +++ b/winpr/include/config/wtypes.h.in @@ -33,13 +33,13 @@ // C23 related macros #if defined(__STDC__) && defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 202311L) -#define WINPR_FALLTHROUGH [[fallthrough]]; +#define WINPR_FALLTHROUGH (void)0; [[fallthrough]]; #elif defined(__clang__) -#define WINPR_FALLTHROUGH __attribute__((fallthrough)); +#define WINPR_FALLTHROUGH (void)0; __attribute__((fallthrough)); #elif defined(__GNUC__) && (__GNUC__ >= 7) -#define WINPR_FALLTHROUGH __attribute__((fallthrough)); +#define WINPR_FALLTHROUGH (void)0; __attribute__((fallthrough)); #else -#define WINPR_FALLTHROUGH +#define WINPR_FALLTHROUGH (void)0; #endif /* Set by CMake during configuration */ diff --git a/winpr/libwinpr/sspi/Kerberos/kerberos.c b/winpr/libwinpr/sspi/Kerberos/kerberos.c index 4a6324f21..1b7797dfb 100644 --- a/winpr/libwinpr/sspi/Kerberos/kerberos.c +++ b/winpr/libwinpr/sspi/Kerberos/kerberos.c @@ -875,7 +875,7 @@ static SECURITY_STATUS SEC_ENTRY kerberos_InitializeSecurityContextA( goto bad_token; /* Continue to AP-REQ */ - /* fall through */ + /* fallthrough */ WINPR_FALLTHROUGH case KERBEROS_STATE_AP_REQ: