Found while compiling sgi kernel: /sys/netinet/igmp.c:140:22: error: implicit conversion from 'int' to 'int8_t' (aka 'signed char') changes value from 148 to -108 [-Werror,-Wconstant-conversion] ra->ipopt_list[0] = IPOPT_RA; ~ ^~~~~~~~ /sys/netinet/ip.h:153:19: note: expanded from macro 'IPOPT_RA'
Use an unsigned type in this case: Index: netinet/ip_var.h =================================================================== RCS file: /cvs/src/sys/netinet/ip_var.h,v retrieving revision 1.86 diff -u -p -r1.86 ip_var.h --- netinet/ip_var.h 8 Dec 2019 11:08:22 -0000 1.86 +++ netinet/ip_var.h 16 Jan 2020 09:48:41 -0000 @@ -92,7 +92,7 @@ struct ipstat { struct ipoption { struct in_addr ipopt_dst; /* first-hop dst if source routed */ - int8_t ipopt_list[MAX_IPOPTLEN]; /* options proper */ + uint8_t ipopt_list[MAX_IPOPTLEN]; /* options proper */ }; #ifdef _KERNEL