[openssl/openssl] 1555c8: Cast values to match printf format strings.

jwt27 noreply at github.com
Mon Nov 14 07:52:04 UTC 2022


  Branch: refs/heads/master
  Home:   https://github.com/openssl/openssl
  Commit: 1555c86e5f7e3c46b4f696ed665c2f988976b81f
      https://github.com/openssl/openssl/commit/1555c86e5f7e3c46b4f696ed665c2f988976b81f
  Author: J.W. Jagersma <jwjagersma at gmail.com>
  Date:   2022-11-14 (Mon, 14 Nov 2022)

  Changed paths:
    M crypto/asn1/x_int64.c
    M ssl/ssl_ciph.c
    M ssl/ssl_txt.c
    M ssl/t1_trce.c
    M test/asn1_time_test.c
    M test/ssl_cert_table_internal_test.c

  Log Message:
  -----------
  Cast values to match printf format strings.

For some reason djgpp uses '(unsigned) long int' for (u)int32_t.  This
causes errors with -Werror=format, even though these types are in
practice identical.

Obvious solution: cast to the types indicated by the format string.

For asn1_time_test.c I changed the format string to %lli since time_t
may be 'long long' some platforms.

Reviewed-by: Hugo Landau <hlandau at openssl.org>
Reviewed-by: Tomas Mraz <tomas at openssl.org>
(Merged from https://github.com/openssl/openssl/pull/19322)


  Commit: 71faab72b8b49819d8bcf065b039d1d840e8b76c
      https://github.com/openssl/openssl/commit/71faab72b8b49819d8bcf065b039d1d840e8b76c
  Author: J.W. Jagersma <jwjagersma at gmail.com>
  Date:   2022-11-14 (Mon, 14 Nov 2022)

  Changed paths:
    M crypto/bio/bss_dgram.c

  Log Message:
  -----------
  Cast socklen_t to size_t in assert comparison

This causes a warning otherwise when socklen_t is signed (Watt32).

Reviewed-by: Hugo Landau <hlandau at openssl.org>
Reviewed-by: Tomas Mraz <tomas at openssl.org>
(Merged from https://github.com/openssl/openssl/pull/19322)


  Commit: 523e54c15cfadb8c19f6a181b9a69aabd9f58453
      https://github.com/openssl/openssl/commit/523e54c15cfadb8c19f6a181b9a69aabd9f58453
  Author: J.W. Jagersma <jwjagersma at gmail.com>
  Date:   2022-11-14 (Mon, 14 Nov 2022)

  Changed paths:
    M crypto/threads_lib.c

  Log Message:
  -----------
  Define threads_lib.c functions only for OPENSSL_SYS_UNIX

This matches the declaration in <openssl/crypto.h>.

Reviewed-by: Hugo Landau <hlandau at openssl.org>
Reviewed-by: Tomas Mraz <tomas at openssl.org>
(Merged from https://github.com/openssl/openssl/pull/19322)


  Commit: d8bcd64170e8b6fb66da293a95ff21b25d1a357e
      https://github.com/openssl/openssl/commit/d8bcd64170e8b6fb66da293a95ff21b25d1a357e
  Author: J.W. Jagersma <jwjagersma at gmail.com>
  Date:   2022-11-14 (Mon, 14 Nov 2022)

  Changed paths:
    M include/internal/time.h

  Log Message:
  -----------
  djgpp: Skip check for negative timeval

This causes a warning since tv_sec is unsigned.

Reviewed-by: Hugo Landau <hlandau at openssl.org>
Reviewed-by: Tomas Mraz <tomas at openssl.org>
(Merged from https://github.com/openssl/openssl/pull/19322)


  Commit: b9179ae5552ab59fa46bad5721125a84c76f8ab4
      https://github.com/openssl/openssl/commit/b9179ae5552ab59fa46bad5721125a84c76f8ab4
  Author: J.W. Jagersma <jwjagersma at gmail.com>
  Date:   2022-11-14 (Mon, 14 Nov 2022)

  Changed paths:
    M crypto/bio/bss_dgram.c

  Log Message:
  -----------
  djgpp: Fix unused-but-set-variable warning

I chose to just hide this behind '#ifndef __DJGPP__', instead of listing
all the macro combinations where it *is* used.  That would make quite a
mess.

Reviewed-by: Hugo Landau <hlandau at openssl.org>
Reviewed-by: Tomas Mraz <tomas at openssl.org>
(Merged from https://github.com/openssl/openssl/pull/19322)


  Commit: 1e065a15119520e13a2d68d003c4c06869208a32
      https://github.com/openssl/openssl/commit/1e065a15119520e13a2d68d003c4c06869208a32
  Author: J.W. Jagersma <jwjagersma at gmail.com>
  Date:   2022-11-14 (Mon, 14 Nov 2022)

  Changed paths:
    M ssl/record/rec_layer_s3.c

  Log Message:
  -----------
  use OSSL_PARAM_construct_uint32 for max_early_data

Otherwise, this causes a warning on platforms where 'uint32_t' is
defined as 'unsigned long int' instead of 'unsigned int'.

Reviewed-by: Hugo Landau <hlandau at openssl.org>
Reviewed-by: Tomas Mraz <tomas at openssl.org>
(Merged from https://github.com/openssl/openssl/pull/19322)


Compare: https://github.com/openssl/openssl/compare/43086b1bd489...1e065a151195


More information about the openssl-commits mailing list