[openssl-project] OS/X builds failing

Richard Levitte levitte at openssl.org
Fri Feb 9 16:23:53 UTC 2018


In message <ED822988-8455-489F-853A-41E3E04C8D8F at dukhovni.org> on Fri, 9 Feb 2018 11:03:40 -0500, Viktor Dukhovni <openssl-users at dukhovni.org> said:

openssl-users> 
openssl-users> 
openssl-users> > On Feb 9, 2018, at 5:15 AM, Matt Caswell <matt at openssl.org> 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         levitte at openssl.org
OpenSSL Project         http://www.openssl.org/~levitte/


More information about the openssl-project mailing list