mirror of
				https://git.kernel.org/pub/scm/network/wireless/iwd.git
				synced 2025-10-31 04:57:25 +01:00 
			
		
		
		
	eap: initialize vendor_id/vendor_type to zero
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;
      |                  ^~~~~~~~~
			
			
This commit is contained in:
		
							parent
							
								
									8ebc4780ea
								
							
						
					
					
						commit
						0a8e646231
					
				| @ -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) | | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 James Prestwood
						James Prestwood