[PATCH v2] secprof: Move labels out of the end of a compound statement
Andrei Otcheretianski
andrei.otcheretianski at intel.com
Thu Oct 29 06:25:32 PDT 2026
A label must be followed by a statement in C17 and older. GCC accepts a
label at the end of a block as an extension, but clang rejects it with
"error: expected statement" and the build fails:
bss.c:1807:2: error: expected statement
Move the no_sp_match and no_valid_sp labels after the closing brace of
the block instead, so that they are followed by the next statement.
Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski at intel.com>
---
wpa_supplicant/bss.c | 2 +-
wpa_supplicant/wpa_supplicant.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/wpa_supplicant/bss.c b/wpa_supplicant/bss.c
index 3f8b46e1da..28ea515889 100644
--- a/wpa_supplicant/bss.c
+++ b/wpa_supplicant/bss.c
@@ -1803,8 +1803,8 @@ wpa_bss_validate_rsne_ml(struct wpa_supplicant *wpa_s, struct wpa_ssid *ssid,
sp_key_mgmt);
wpa_ie.key_mgmt |= sp_key_mgmt;
}
- no_sp_match:
}
+no_sp_match:
wpa_ie.key_mgmt &= ~(WPA_KEY_MGMT_PSK | WPA_KEY_MGMT_FT_PSK |
WPA_KEY_MGMT_PSK_SHA256);
diff --git a/wpa_supplicant/wpa_supplicant.c b/wpa_supplicant/wpa_supplicant.c
index 88ef597c71..61f362d9f5 100644
--- a/wpa_supplicant/wpa_supplicant.c
+++ b/wpa_supplicant/wpa_supplicant.c
@@ -2933,8 +2933,8 @@ 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:
}
+no_valid_sp:
if (!skip_default_rsne) {
if (wpa_sm_set_assoc_wpa_ie_default(wpa_s->wpa, wpa_ie,
--
2.53.0
More information about the Hostap
mailing list