CVSROOT:        /cvs
Module name:    src
Changes by:     t...@cvs.openbsd.org    2022/08/10 01:58:04

Modified files:
        usr.bin/ctfdump: ctfdump.c 

Log message:
Fix two compiler warnings resulting from last zlib bump

total_out is now an unsigned long, so a format string warning is issued
on all architectures. Fix this and also fix the format string for the
off_t len, which is signed, not unsigned.

Comparing an unsigned long to an off_t involves implementation-defined
behavior for values > LONG_MAX on 64-bit architectures, so the compiler
complains. Fix this by checking that len >= 0 and then casting both sides
to a wider type.

reported by and ok deraadt

Reply via email to