diff options
author | Jim Mussared <jim.mussared@gmail.com> | 2022-07-20 17:30:16 +1000 |
---|---|---|
committer | Damien George <damien@micropython.org> | 2022-07-21 16:26:04 +1000 |
commit | 4cf9928902a1e4bca4edc433eeab6b8fdb1a5245 (patch) | |
tree | d6cea10d1c018a89e4f4d039a946d0ae6d9a1212 /drivers | |
parent | a0538270841987b87f44164548d6c2696a05fdee (diff) | |
download | micropython-4cf9928902a1e4bca4edc433eeab6b8fdb1a5245.tar.gz micropython-4cf9928902a1e4bca4edc433eeab6b8fdb1a5245.zip |
cc3200: Fix various array-based compiler warnings.
1. Add -Wno-array-bounds to avoid false positive on gcc 12.1; see related
issue #8685.
2. Remove always-true not-NULL-check (Msg.Rsp.Args.Common.Bssid is an array
not a pointer).
3. Fix pointer-to-freed-stack in wlan_set_security.
Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/cc3100/src/wlan.c | 5 |
1 files changed, 1 insertions, 4 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); |