-
Notifications
You must be signed in to change notification settings - Fork 5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[4.16] Fix outstanding GCC 6.4.0 and GCC 7.3.0 warnings #2418
Merged
pelwell
merged 4 commits into
raspberrypi:rpi-4.16.y
from
nathanchance:compilation-fixes-4.16
Mar 13, 2018
Merged
[4.16] Fix outstanding GCC 6.4.0 and GCC 7.3.0 warnings #2418
pelwell
merged 4 commits into
raspberrypi:rpi-4.16.y
from
nathanchance:compilation-fixes-4.16
Mar 13, 2018
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
../drivers/net/wireless/realtek/rtl8192cu/hal/rtl8192c/rtl8192c_rf6052.c: In function ‘PHY_RFShadowRefresh’: ../drivers/net/wireless/realtek/rtl8192cu/hal/rtl8192c/rtl8192c_rf6052.c:1020:37: warning: iteration 63 invokes undefined behavior [-Waggressive-loop-optimizations] RF_Shadow[eRFPath][Offset].Value = 0; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~ ../drivers/net/wireless/realtek/rtl8192cu/hal/rtl8192c/rtl8192c_rf6052.c:1018:3: note: within this loop for (Offset = 0; Offset <= RF6052_MAX_REG; Offset++) ^~~ Signed-off-by: Marc Kleine-Budde <[email protected]> Signed-off-by: Nathan Chancellor <[email protected]>
These warnings appear with GCC 6.4.0 from toolchains.bootlin.com: ../drivers/net/wireless/realtek/rtl8192cu/core/rtw_security.c: In function ‘aes_cipher’: ../drivers/net/wireless/realtek/rtl8192cu/core/rtw_security.c:1504:5: warning: this ‘for’ clause does not guard... [-Wmisleading-indentation] for (j = 0; j < 8; j++) ^~~ ../drivers/net/wireless/realtek/rtl8192cu/core/rtw_security.c:1507:2: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the ‘for’ payload_index = hdrlen + 8; ^~~~~~~~~~~~~ ../drivers/net/wireless/realtek/rtl8192cu/core/rtw_security.c: In function ‘aes_decipher’: ../drivers/net/wireless/realtek/rtl8192cu/core/rtw_security.c:1878:5: warning: this ‘for’ clause does not guard... [-Wmisleading-indentation] for (j = 0; j < 8; j++) ^~~ ../drivers/net/wireless/realtek/rtl8192cu/core/rtw_security.c:1881:2: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the ‘for’ payload_index = hdrlen + 8; ^~~~~~~~~~~~~ ../drivers/net/wireless/realtek/rtl8192cu/core/rtw_mlme_ext.c:5666:5: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation] if( _rtw_memcmp(pwdinfo->rx_prov_disc_info.peerDevAddr, empty_addr, ETH_ALEN) ); ^~ ../drivers/net/wireless/realtek/rtl8192cu/core/rtw_mlme_ext.c:5667:6: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the ‘if’ _rtw_memcpy(pwdinfo->rx_prov_disc_info.peerDevAddr, GetAddr2Ptr(pframe), ETH_ALEN); ^~~~~~~~~~~ It appears to be due to tabs versus spaces. Signed-off-by: Nathan Chancellor <[email protected]>
Compiler used: toolchains.bootlin.com Reference: https://github.com/diederikdehaas/rtl8812AU [@nathanchance: Cherry-picked from 6c19878 and updated message] Signed-off-by: Nathan Chancellor <[email protected]>
These warnings appear with GCC 7.3.0 from toolchains.bootlin.com: ../drivers/net/wireless/realtek/rtl8192cu/core/rtw_mlme_ext.c: In function ‘mgt_dispatcher’: ../drivers/net/wireless/realtek/rtl8192cu/core/rtw_mlme_ext.c:734:6: warning: this statement may fall through [-Wimplicit-fallthrough=] if(check_fwstate(pmlmepriv, WIFI_AP_STATE) == _TRUE) ^ ../drivers/net/wireless/realtek/rtl8192cu/core/rtw_mlme_ext.c:739:3: note: here case WIFI_ASSOCREQ: ^~~~ ../drivers/net/wireless/realtek/rtl8192cu/hal/rtl8192c/rtl8192c_phycfg.c: In function ‘phy_TxPwrIdxToDbm’: ../drivers/net/wireless/realtek/rtl8192cu/hal/rtl8192c/rtl8192c_phycfg.c:2365:10: warning: this statement may fall through [-Wimplicit-fallthrough=] Offset = -8; ~~~~~~~^~~~ ../drivers/net/wireless/realtek/rtl8192cu/hal/rtl8192c/rtl8192c_phycfg.c:2366:2: note: here default: ^~~~~~~ ../drivers/net/wireless/realtek/rtl8192cu/hal/rtl8192c/usb/usb_halinit.c: In function ‘GetHwReg8192CU’: ../drivers/net/wireless/realtek/rtl8192cu/hal/rtl8192c/usb/usb_halinit.c:5694:20: warning: this statement may fall through [-Wimplicit-fallthrough=] *((u16 *)(val)) = pHalData->BasicRateSet; ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~ ../drivers/net/wireless/realtek/rtl8192cu/hal/rtl8192c/usb/usb_halinit.c:5695:3: note: here case HW_VAR_TXPAUSE: ^~~~ ../drivers/net/wireless/realtek/rtl8192cu/os_dep/linux/ioctl_linux.c: In function ‘set_group_key’: ../drivers/net/wireless/realtek/rtl8192cu/os_dep/linux/ioctl_linux.c:7383:11: warning: this statement may fall through [-Wimplicit-fallthrough=] keylen = 16; ~~~~~~~^~~~ ../drivers/net/wireless/realtek/rtl8192cu/os_dep/linux/ioctl_linux.c:7384:3: note: here default: ^~~~~~~ ../drivers/net/wireless/realtek/rtl8192cu/os_dep/linux/ioctl_cfg80211.c: In function ‘set_group_key’: ../drivers/net/wireless/realtek/rtl8192cu/os_dep/linux/ioctl_cfg80211.c:822:11: warning: this statement may fall through [-Wimplicit-fallthrough=] keylen = 16; ~~~~~~~^~~~ ../drivers/net/wireless/realtek/rtl8192cu/os_dep/linux/ioctl_cfg80211.c:823:3: note: here default: ^~~~~~~ None of them appear to be a real issue but it is trivial to make the warnings go away. Signed-off-by: Nathan Chancellor <[email protected]>
nathanchance
force-pushed
the
compilation-fixes-4.16
branch
from
March 5, 2018 16:07
78c333a
to
9bf6e54
Compare
Thank you. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Same ones as #2413, with a couple of extra commits ported forward from older branches since it appears d3b1ce0 overrode the fixes from 9db27f3 and 6529008 in 2d806f1. I will look into submitting these upstream so you don't have to worry about constantly carrying them forward.