-
Notifications
You must be signed in to change notification settings - Fork 14
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
-Wsometimes-uninitialized in net/wireless/util.c #382
Comments
final branch should just be an |
With
Without
However, I assume that all of this analysis occurs before optimization so Clang can't tell that the last diff --git a/net/wireless/util.c b/net/wireless/util.c
index e4b8db5e81ec..8c381ca22903 100644
--- a/net/wireless/util.c
+++ b/net/wireless/util.c
@@ -1220,9 +1220,11 @@ static u32 cfg80211_calculate_bitrate_he(struct rate_info *rate)
else if (rate->bw == RATE_INFO_BW_HE_RU &&
rate->he_ru_alloc == NL80211_RATE_INFO_HE_RU_ALLOC_26)
result = rates_26[rate->he_gi];
- else if (WARN(1, "invalid HE MCS: bw:%d, ru:%d\n",
- rate->bw, rate->he_ru_alloc))
+ else {
+ WARN(1, "invalid HE MCS: bw:%d, ru:%d\n",
+ rate->bw, rate->he_ru_alloc);
return 0;
+ }
/* now scale to the appropriate MCS */
tmp = result; |
@nickdesaulniers Does the reasoning behind this make sense? Something tells me we're going to get some push back on some of these fixes so I want to make sure to convey that some of these warnings will be from how GCC and Clang differ in when semantic analysis and warnings occur:
|
I'd cut
and say something to the effect that
idk |
I don't necessarily agree with the comment about |
I opened https://llvm.org/pr41197, I think this is one of those. |
Merged into mainline: https://git.kernel.org/torvalds/c/344c9719c508bb3ef4e9c134066c83ff00ab6206 |
reported from #381 :
The text was updated successfully, but these errors were encountered: