From: James Prestwood <prestwoj@gmail.com>
To: iwd@lists.linux.dev
Cc: James Prestwood <prestwoj@gmail.com>
Subject: [PATCH 1/4] eap: initialize vendor_id/vendor_type to zero
Date: Tue, 11 Feb 2025 11:26:53 -0800 [thread overview]
Message-ID: <20250211192656.83157-1-prestwoj@gmail.com> (raw)
This fixes a compiler warning, specifically on ARM/GCC 12.2.0
src/eap.c: In function ‘eap_rx_packet’:
src/eap.c:419:57: error: ‘vendor_type’ may be used uninitialized [-Werror=maybe-uninitialized]
419 | (type == EAP_TYPE_EXPANDED && vendor_id == (id) && vendor_type == (t))
| ^~
src/eap.c:429:18: note: ‘vendor_type’ was declared here
429 | uint32_t vendor_type;
| ^~~~~~~~~~~
src/eap.c:419:49: error: ‘vendor_id’ may be used uninitialized [-Werror=maybe-uninitialized]
419 | (type == EAP_TYPE_EXPANDED && vendor_id == (id) && vendor_type == (t))
| ^~
src/eap.c:428:18: note: ‘vendor_id’ was declared here
428 | uint32_t vendor_id;
| ^~~~~~~~~
---
src/eap.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/eap.c b/src/eap.c
index 9e924577..1a03fbcb 100644
--- a/src/eap.c
+++ b/src/eap.c
@@ -425,8 +425,8 @@ static void eap_handle_response(struct eap_state *eap, const uint8_t *pkt,
size_t len)
{
enum eap_type type;
- uint32_t vendor_id;
- uint32_t vendor_type;
+ uint32_t vendor_id = 0;
+ uint32_t vendor_type = 0;
enum eap_type our_type = eap->method->request_type;
uint32_t our_vendor_id = (eap->method->vendor_id[0] << 16) |
(eap->method->vendor_id[1] << 8) |
--
2.34.1
next reply other threads:[~2025-02-11 19:27 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-11 19:26 James Prestwood [this message]
2025-02-11 19:26 ` [PATCH 2/4] netdev: fail the connection if sending external auth fails James Prestwood
2025-02-11 19:26 ` [PATCH 3/4] wiphy: clean up some spammy prints James Prestwood
2025-02-11 19:26 ` [PATCH 4/4] station: print security of network when connecting James Prestwood
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250211192656.83157-1-prestwoj@gmail.com \
--to=prestwoj@gmail.com \
--cc=iwd@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox