Commit 171f080
committed
M5 grade-2 tools: fix GCC 12 stringop-overflow guards
GCC 12 hardened -Wstringop-overflow detection emits -Werror on
tools/libnetgraph/msg.c:240 (strncpy 512 bytes into 32-byte
sg_data) and tools/ngctl/write.c:115 (strlcpy 254 bytes into
32-byte sg_data). Both files already had #pragma GCC diagnostic
push/pop blocks but guarded under "#if __GNUC__ >= 13", missing
GCC 12. Lower the guard to "#if __GNUC__ >= 12".
Net effect:
- tools/sbin/{ifconfig, route, ipfw, arp, ndp, ngctl,
netstat} all link cleanly (24-25M each)
- tools/{libnetgraph, libutil, libmemstat, libxo, sysctl,
top, traffic, knictl, compat} 9 verify-only PASS
- libffcompat.a: 22 .o / 301K1 parent 5c7cc7e commit 171f080
2 files changed
Lines changed: 4 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
233 | 233 | | |
234 | 234 | | |
235 | 235 | | |
236 | | - | |
| 236 | + | |
237 | 237 | | |
238 | 238 | | |
239 | 239 | | |
240 | 240 | | |
241 | | - | |
| 241 | + | |
242 | 242 | | |
243 | 243 | | |
244 | 244 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
108 | 108 | | |
109 | 109 | | |
110 | 110 | | |
111 | | - | |
| 111 | + | |
112 | 112 | | |
113 | 113 | | |
114 | 114 | | |
115 | 115 | | |
116 | | - | |
| 116 | + | |
117 | 117 | | |
118 | 118 | | |
119 | 119 | | |
| |||
0 commit comments