Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

ramdisk-zfsroot bild fails in route(8) code



Attempting to build ramdisk-zfsroot after 
<https://wiki.netbsd.org/wiki/RootOnZFS/> in -current fails for me with 
a gcc warning

[...]
#   compile  x_route/rtutil.o
/u3/netbsd-builds/developer/amd64/tools/bin/x86_64--netbsd-gcc -Os 
-fno-asynchronous-unwind-tables -pipe -Wall -Wno-error   -pipe    
-std=gnu99   -Werror     
--sysroot=/u3/netbsd-builds/developer/amd64/destdir -DSMALL 
-I/export/netbsd-developer/distrib/utils/x_route/../../../sbin/route 
-DCRUNCHOPS -DINET6  -c    
/export/netbsd-developer/distrib/utils/x_route/../../../sbin/route/rtutil.c 
-o rtutil.o.o
/export/netbsd-developer/distrib/utils/x_route/../../../sbin/route/rtutil.c: 
In function 'netname6':
/export/netbsd-developer/distrib/utils/x_route/../../../sbin/route/rtutil.c:690:32: 
error: '%s' directive output may be truncated writing up to 1024 bytes 
into a region of size 256 [-Werror=format-truncation=]
  690 |  snprintf(line, sizeof(line), "%s/%d", hbuf, masklen);
      |                                ^~      ~~~~
/export/netbsd-developer/distrib/utils/x_route/../../../sbin/route/rtutil.c:690:31: 
note: directive argument in the range [0, 2147483647]
  690 |  snprintf(line, sizeof(line), "%s/%d", hbuf, masklen);
      |                               ^~~~~~~
/export/netbsd-developer/distrib/utils/x_route/../../../sbin/route/rtutil.c:690:2: 
note: 'snprintf' output between 3 and 1036 bytes into a destination of 
size 256
  690 |  snprintf(line, sizeof(line), "%s/%d", hbuf, masklen);
      |  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors

*** Failed target:  rtutil.o
*** Failed command: 
/u3/netbsd-builds/developer/amd64/tools/bin/x86_64--netbsd-gcc -Os 
-fno-asynchronous-unwind-tables -pipe -Wall -Wno-error -pipe -std=gnu99 
-Werror --sysroot=/u3/netbsd-builds/developer/amd64/destdir -DSMALL 
-I/export/netbsd-developer/distrib/utils/x_route/../../../sbin/route 
-DCRUNCHOPS -DINET6 -c 
/export/netbsd-developer/distrib/utils/x_route/../../../sbin/route/rtutil.c 
-o rtutil.o.o
*** Error code 1

Stop.
nbmake[2]: stopped in 
/u1/netbsd-developer/src/distrib/amd64/ramdisks/ramdisk-zfsroot/route
[...]

Given the netname6() function does elaborate dances with masklen, does 
this speak to anybody?

Cheerio,
Hauke

-- 
Hauke Fath                        <hauke%Espresso.Rhein-Neckar.DE@localhost>
Linnéweg 7
64342 Seeheim-Jugenheim
Germany


Home | Main Index | Thread Index | Old Index