[PATCH] secprof: Add a statement after labels at end of a block

Andrei Otcheretianski andrei.otcheretianski at intel.com
Thu Oct 8 04:55:48 PDT 2026


A label must be followed by a statement in C17 and older; C23 lifted
that requirement. GCC accepts the construct as an extension, but a
compiler that enforces the constraint rejects it with "label at end of
compound statement" and the build fails.

Add an empty statement after the no_room, no_sp_match and no_valid_sp
labels.

Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski at intel.com>
---
 src/ap/ieee802_11.c             | 1 +
 wpa_supplicant/bss.c            | 1 +
 wpa_supplicant/wpa_supplicant.c | 1 +
 3 files changed, 3 insertions(+)

diff --git a/src/ap/ieee802_11.c b/src/ap/ieee802_11.c
index 219a94b0f9..5ddddf63a9 100644
--- a/src/ap/ieee802_11.c
+++ b/src/ap/ieee802_11.c
@@ -7636,6 +7636,7 @@ rsnxe_done:
 		if (hapd->conf->security_profiles)
 			p = hostapd_eid_security_profile(hapd, p);
 	no_room:
+		;
 	}
 #endif /* CONFIG_ENC_ASSOC */
 
diff --git a/wpa_supplicant/bss.c b/wpa_supplicant/bss.c
index b534cab1cd..7604ed6a73 100644
--- a/wpa_supplicant/bss.c
+++ b/wpa_supplicant/bss.c
@@ -1794,6 +1794,7 @@ wpa_bss_validate_rsne_ml(struct wpa_supplicant *wpa_s, struct wpa_ssid *ssid,
 			wpa_ie.key_mgmt |= sp_key_mgmt;
 		}
 	no_sp_match:
+		;
 	}
 
 	wpa_ie.key_mgmt &= ~(WPA_KEY_MGMT_PSK | WPA_KEY_MGMT_FT_PSK |
diff --git a/wpa_supplicant/wpa_supplicant.c b/wpa_supplicant/wpa_supplicant.c
index aa455c2041..8aac657a28 100644
--- a/wpa_supplicant/wpa_supplicant.c
+++ b/wpa_supplicant/wpa_supplicant.c
@@ -2901,6 +2901,7 @@ int wpa_supplicant_set_suites(struct wpa_supplicant *wpa_s,
 		wpa_sm_set_security_profile(wpa_s->wpa,
 					    wpa_s->sel_security_profile);
 	no_valid_sp:
+		;
 	}
 
 	if (!skip_default_rsne) {
-- 
2.53.0




More information about the Hostap mailing list