In message <[email protected]> on Fri, 9 Feb 2018 11:03:40 -0500, Viktor Dukhovni <[email protected]> said:
openssl-users> openssl-users> openssl-users> > On Feb 9, 2018, at 5:15 AM, Matt Caswell <[email protected]> wrote: openssl-users> > openssl-users> > The new travis OS/X builds are failing with this: openssl-users> > openssl-users> > -MT apps/enc.o -c -o apps/enc.o apps/enc.c openssl-users> > apps/enc.c:567:54: error: format specifies type 'uintmax_t' (aka openssl-users> > 'unsigned long') but the argument has type 'uint64_t' (aka 'unsigned openssl-users> > long long') [-Werror,-Wformat] openssl-users> > BIO_printf(bio_err, "bytes read : %8ju\n", BIO_number_read(in)); openssl-users> > ~~~~ ^~~~~~~~~~~~~~~~~~~ openssl-users> > %8llu openssl-users> > apps/enc.c:568:54: error: format specifies type 'uintmax_t' (aka openssl-users> > 'unsigned long') but the argument has type 'uint64_t' (aka 'unsigned openssl-users> > long long') [-Werror,-Wformat] openssl-users> > BIO_printf(bio_err, "bytes written: %8ju\n", openssl-users> > BIO_number_written(out)); openssl-users> > ~~~~ ^~~~~~~~~~~~~~~~~~~~~~~ openssl-users> > %8llu openssl-users> > 2 errors generated. openssl-users> > openssl-users> > openssl-users> > The thing is though this is *our* BIO_printf, and we do seem to expect a openssl-users> > uint64_t for a "%ju". So I'm not sure how to fix that. openssl-users> openssl-users> The obvious and correct fix is to cast the output of BIO_number_read() and openssl-users> BIO_number_written() to uintmax_t. And we should expect uintmax_t with %j, openssl-users> even in our BIO_printf(). It happens to be 64-bit on all the platforms we openssl-users> support perhaps (any Crays?), but that's just a coincidence. >From those errors, it looks to me like uintmax_t isn't 64-bit on that Mac OS/X machine, unless 'unsigned long' and 'unsigned long long' are the same. (that error does surprise me, since uintmax_t is supposed to be the largest integer type possible, and yet, the error suggests that this isn't the case here) Cheers, Richard ( or do I misunderstand something here? ) -- Richard Levitte [email protected] OpenSSL Project http://www.openssl.org/~levitte/ _______________________________________________ openssl-project mailing list [email protected] https://mta.openssl.org/mailman/listinfo/openssl-project
