hannestschofenig / mbedtls

An open source, portable, easy to use, readable and flexible SSL library
https://tls.mbed.org
Apache License 2.0
15 stars 8 forks source link

Fix compiler warning found on Mac #363

Closed zhihan closed 3 years ago

zhihan commented 3 years ago

Fix the following compiler error.

/Users/zhih/scratch/mbedtls/library/ssl_tls13_server.c:712:31: error: format specifies type 'long' but the argument has type 'int64_t' (aka 'long long')
      [-Werror,-Wformat]
                              diff ) );
                              ^~~~
/Users/zhih/scratch/mbedtls/include/mbedtls/debug.h:39:57: note: expanded from macro 'MBEDTLS_SSL_DEBUG_MSG'
                             MBEDTLS_DEBUG_STRIP_PARENS args )
                                                        ^~~~
/Users/zhih/scratch/mbedtls/include/mbedtls/debug.h:35:45: note: expanded from macro 'MBEDTLS_DEBUG_STRIP_PARENS'
#define MBEDTLS_DEBUG_STRIP_PARENS( ... )   __VA_ARGS__
                                            ^~~~~~~~~~~
/Users/zhih/scratch/mbedtls/library/ssl_tls13_server.c:728:69: error: format specifies type 'long' but the argument has type 'int64_t' (aka 'long long')
      [-Werror,-Wformat]
                              "MBEDTLS_SSL_EARLY_DATA_MAX_DELAY )", diff ) );
                                                                    ^~~~
/Users/zhih/scratch/mbedtls/include/mbedtls/debug.h:39:57: note: expanded from macro 'MBEDTLS_SSL_DEBUG_MSG'
                             MBEDTLS_DEBUG_STRIP_PARENS args )
                                                        ^~~~
/Users/zhih/scratch/mbedtls/include/mbedtls/debug.h:35:45: note: expanded from macro 'MBEDTLS_DEBUG_STRIP_PARENS'
#define MBEDTLS_DEBUG_STRIP_PARENS( ... )   __VA_ARGS__
                                            ^~~~~~~~~~~

Notes:

Status

READY/IN DEVELOPMENT/HOLD

Requires Backporting

When there is a bug fix, it should be backported to all maintained and supported branches. Changes do not have to be backported if:

Yes | NO
Which branch?

Migrations

If there is any API change, what's the incentive and logic for it.

YES | NO

Additional comments

Any additional information that could be of interest

Todos

Steps to test or reproduce

Outline the steps to test or reproduce the PR here.