After a long time of not paying attention, I'm building git master on
NetBSD 10 amd64.

building results in 4 warnings:

  gpsd-3.26.2~dev/clients/gpsrinex.c:1008:23: warning: array subscript has type 
‘char’ [-Wchar-subscripts]
  gpsd-3.26.2~dev/gpsmon/monitor_nmea0183.c:313:17: warning: array subscript -1 
is outside array bounds of ‘char[132]’ [-Warray-bounds]
  gpsd-3.26.2~dev/gpsmon/monitor_nmea0183.c:314:17: warning: array subscript -2 
is outside array bounds of ‘char[132]’ [-Warray-bounds]
  gpsd-3.26.2~dev/gpsmon/monitor_nmea0183.c:315:17: warning: array subscript -3 
is outside array bounds of ‘char[132]’ [-Warray-bounds]

I've locally fixed the first and will push a fix.

I also noticed some UB with ctype calls, where a char * was dereferenced
and assigned to an int and then used.   ctype calls are only defined if
the input is a value from unsigned char or EOF, and char * to int could
be -5 to pick an arbitrary example.    I have a fix for that and will
run it by the list after testing.

FYI that NetBSD current now by default asserts on ctype UB, which is,
along with Halt and Catch Fire, one of the behaviors permitted by the
spec :-)

Tests (run as non-root) throw a lot of:

  gpsd:ERROR: CORE: setuid() failed, Operation not permitted(1)

but I'm assuming that's Not Important.

Reply via email to