Project

General

Profile

Bug #13401

Updated by Toomas Soome over 1 year ago

Build error with gcc 10: 
 <pre> 
     benv.c: In function 'add_pair': 
     benv.c:754:22: error: 'lv' may be used uninitialized in this function [-Werror=maybe-uninitialized] 
       754 |     if (lv < INT16_MIN || lv > INT16_MAX) 
     cc1: all warnings being treated as errors 
 </pre> 

 Typo created by me. Compiler gags are bad. 

 Testing one: 
 <pre> 
 root@test:/home/tsoome# eeprom -b -n illumos:nvstore -k test -t DATA_TYPE_INT16 -v 32768 
 error: Invalid argument 
 root@test:/home/tsoome# eeprom -b -n illumos:nvstore -k test -t DATA_TYPE_INT16 -v 32767 
 zfs bootenv is successfully written 
 root@test:/home/tsoome#  
 root@test:/home/tsoome# eeprom -bp 
 nvlist version: 0 
	 version = 0x1 
	 illumos:nvstore = (embedded nvlist) 
	 nvlist version: 0 
		 help = not now 
		 test = 32767 
	 (end illumos:nvstore) 

 root@test:/home/tsoome# eeprom -b -n illumos:nvstore -k test -t DATA_TYPE_INT16 -v 32768 
 error: Invalid argument 
 root@test:/home/tsoome# eeprom -b -n illumos:nvstore -k test -t DATA_TYPE_INT16 -v -32768 
 zfs bootenv is successfully written 
 root@test:/home/tsoome# eeprom -b -n illumos:nvstore -k test -t DATA_TYPE_INT16 -v -32769 
 error: Invalid argument 
 root@test:/home/tsoome# eeprom -bp 
 nvlist version: 0 
	 version = 0x1 
	 illumos:nvstore = (embedded nvlist) 
	 nvlist version: 0 
		 help = not now 
		 test = -32768 
	 (end illumos:nvstore) 
 </pre>

Back