summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--drivers/cc3100/src/wlan.c5
-rw-r--r--ports/cc3200/Makefile3
-rw-r--r--ports/cc3200/mods/modwlan.c2
3 files changed, 5 insertions, 5 deletions
diff --git a/drivers/cc3100/src/wlan.c b/drivers/cc3100/src/wlan.c
index 59adf02f02..22be4d7ddf 100644
--- a/drivers/cc3100/src/wlan.c
+++ b/drivers/cc3100/src/wlan.c
@@ -536,10 +536,7 @@ _i16 sl_WlanProfileGet(const _i16 Index,_i8* pName, _i16 *pNameLen, _u8 *pMacAd
*pNameLen = Msg.Rsp.Args.Common.SsidLen;
*pPriority = Msg.Rsp.Args.Common.Priority;
- if (NULL != Msg.Rsp.Args.Common.Bssid)
- {
- sl_Memcpy(pMacAddr, Msg.Rsp.Args.Common.Bssid, sizeof(Msg.Rsp.Args.Common.Bssid));
- }
+ sl_Memcpy(pMacAddr, Msg.Rsp.Args.Common.Bssid, sizeof(Msg.Rsp.Args.Common.Bssid));
sl_Memcpy(pName, EAP_PROFILE_SSID_STRING(&Msg), *pNameLen);
diff --git a/ports/cc3200/Makefile b/ports/cc3200/Makefile
index 90be4529d8..b880ad646b 100644
--- a/ports/cc3200/Makefile
+++ b/ports/cc3200/Makefile
@@ -25,6 +25,9 @@ CFLAGS += -g -ffunction-sections -fdata-sections -fno-common -fsigned-char -mno-
CFLAGS += -Iboards/$(BOARD)
CFLAGS += $(CFLAGS_MOD)
+# Workaround gcc 12.1 bug.
+CFLAGS += -Wno-array-bounds
+
LDFLAGS = -Wl,-nostdlib -Wl,--gc-sections -Wl,-Map=$@.map
FLASH_SIZE_WIPY = 2M
diff --git a/ports/cc3200/mods/modwlan.c b/ports/cc3200/mods/modwlan.c
index 920079b589..3b686932e8 100644
--- a/ports/cc3200/mods/modwlan.c
+++ b/ports/cc3200/mods/modwlan.c
@@ -641,8 +641,8 @@ STATIC void wlan_set_security (uint8_t auth, const char *key, uint8_t len) {
if (key != NULL) {
memcpy(&wlan_obj.key, key, len);
wlan_obj.key[len] = '\0';
+ _u8 wep_key[32];
if (auth == SL_SEC_TYPE_WEP) {
- _u8 wep_key[32];
wlan_wep_key_unhexlify(key, (char *)&wep_key);
key = (const char *)&wep_key;
len /= 2;