All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] eap: fix uninitialized variable error
@ 2021-11-08 20:55 James Prestwood
  0 siblings, 0 replies; only message in thread
From: James Prestwood @ 2021-11-08 20:55 UTC (permalink / raw)
  To: iwd

[-- Attachment #1: Type: text/plain, Size: 812 bytes --]

src/eap.c: In function 'eap_rx_packet':
src/eap.c:417:57: error: 'vendor_type' may be used uninitialized in this
                          function [-Werror=maybe-uninitialized]
  417 |  (type == EAP_TYPE_EXPANDED && vendor_id == (id) && vendor_type == (t))
---
 src/eap.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/eap.c b/src/eap.c
index 10381af7..b67049fd 100644
--- a/src/eap.c
+++ b/src/eap.c
@@ -424,7 +424,7 @@ static void eap_handle_response(struct eap_state *eap, const uint8_t *pkt,
 {
 	enum eap_type type;
 	uint32_t vendor_id;
-	uint32_t vendor_type;
+	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.31.1

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2021-11-08 20:55 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-08 20:55 [PATCH v2] eap: fix uninitialized variable error James Prestwood

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.