diff options
author | vlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4> | 2021-04-16 07:38:48 +0000 |
---|---|---|
committer | vlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4> | 2021-04-16 07:38:48 +0000 |
commit | 2b410ca84bc1cae337c0c8f8a39e28a1fc20747a (patch) | |
tree | 6d5ba85aa31212a16e6b3e29a28aa580a32cb9a1 /src/mpfr-impl.h | |
parent | aa010ccb105d44351b57ca068d001b31bb680a53 (diff) | |
download | mpfr-2b410ca84bc1cae337c0c8f8a39e28a1fc20747a.tar.gz |
[src/mpfr-impl.h] Added cast to int for __LINE__ in formatted output.
The standard just says that __LINE__ in an integer constant. So its
type might be larger than int, even though the value is representable
in an int (like in MPFR). This concerns logging code, only available
for GCC compatible compilers, so that there should not be any issue
without the cast, but just in case...
git-svn-id: https://scm.gforge.inria.fr/anonscm/svn/mpfr/trunk@14487 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'src/mpfr-impl.h')
-rw-r--r-- | src/mpfr-impl.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/mpfr-impl.h b/src/mpfr-impl.h index b7e7d1792..20bf28538 100644 --- a/src/mpfr-impl.h +++ b/src/mpfr-impl.h @@ -2177,10 +2177,11 @@ __MPFR_DECLSPEC extern mpfr_prec_t mpfr_log_prec; #define MPFR_LOG_VAR(x) \ LOG_PRINT (MPFR_LOG_INTERNAL_F, "%s.%d:%s[%#Pu]=%.*Rg\n", __func__, \ - __LINE__, #x, mpfr_get_prec (x), mpfr_log_prec, x) + (int) __LINE__, #x, mpfr_get_prec (x), mpfr_log_prec, x) #define MPFR_LOG_MSG2(format, ...) \ - LOG_PRINT (MPFR_LOG_MSG_F, "%s.%d: "format, __func__, __LINE__, __VA_ARGS__) + LOG_PRINT (MPFR_LOG_MSG_F, "%s.%d: "format, __func__, (int) __LINE__, \ + __VA_ARGS__) #define MPFR_LOG_MSG(x) MPFR_LOG_MSG2 x #define MPFR_LOG_BEGIN2(format, ...) \ |