]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
lib/torture: Use portable format specifiers
authorJoseph Sutton <josephsutton@catalyst.net.nz>
Wed, 18 Oct 2023 23:34:30 +0000 (12:34 +1300)
committerAndreas Schneider <asn@cryptomilk.org>
Tue, 24 Oct 2023 14:48:36 +0000 (14:48 +0000)
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15498

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andreas Schneider <asn@samba.org>
lib/torture/torture.h

index 6818084ea9612f4ed1edaaf3c6c7b10e56fc15c7..94d8543770cd6f818f27264408951392c6cc28ca 100644 (file)
@@ -561,9 +561,9 @@ static inline void torture_dump_data_str_cb(const char *buf, void *private_data)
        do { uint32_t __got = (got), __expected = (expected); \
        if (__got != __expected) { \
                torture_result(torture_ctx, TORTURE_FAIL, \
-                       __location__": "#got" was %ju (0x%jX), expected %ju (0x%jX): %s", \
-                       (uintmax_t)__got, (uintmax_t)__got, \
-                       (uintmax_t)__expected, (uintmax_t)__expected, \
+                       __location__": "#got" was %"PRIu32" (0x%"PRIX32"), expected %"PRIu32" (0x%"PRIX32"): %s", \
+                       __got, __got, \
+                       __expected, __expected, \
                        cmt); \
                return false; \
        } \
@@ -573,9 +573,9 @@ static inline void torture_dump_data_str_cb(const char *buf, void *private_data)
        do { uint32_t __got = (got), __expected = (expected); \
        if (__got != __expected) { \
                torture_result(torture_ctx, TORTURE_FAIL, \
-                       __location__": "#got" was %ju (0x%jX), expected %ju (0x%jX): %s", \
-                       (uintmax_t)__got, (uintmax_t)__got, \
-                       (uintmax_t)__expected, (uintmax_t)__expected, \
+                       __location__": "#got" was %"PRIu32" (0x%"PRIX32"), expected %"PRIu32" (0x%"PRIX32"): %s", \
+                       __got, __got, \
+                       __expected, __expected, \
                        cmt); \
                ret = false; \
                goto label; \
@@ -586,8 +586,8 @@ static inline void torture_dump_data_str_cb(const char *buf, void *private_data)
        do { uint32_t __got = (got), __not_expected = (not_expected); \
        if (__got == __not_expected) { \
                torture_result(torture_ctx, TORTURE_FAIL, \
-                       __location__": "#got" was %ju (0x%jX), expected a different number: %s", \
-                       (uintmax_t)__got, (uintmax_t)__got, \
+                       __location__": "#got" was %"PRIu32" (0x%"PRIX32"), expected a different number: %s", \
+                       __got, __got, \
                        cmt); \
                return false; \
        } \
@@ -597,8 +597,8 @@ static inline void torture_dump_data_str_cb(const char *buf, void *private_data)
        do { uint32_t __got = (got), __not_expected = (not_expected); \
        if (__got == __not_expected) { \
                torture_result(torture_ctx, TORTURE_FAIL, \
-                       __location__": "#got" was %ju (0x%jX), expected a different number: %s", \
-                       (uintmax_t)__got, (uintmax_t)__got, \
+                       __location__": "#got" was %"PRIu32" (0x%"PRIX32"), expected a different number: %s", \
+                       __got, __got, \
                        cmt); \
                ret = false; \
                goto label; \
@@ -609,9 +609,9 @@ static inline void torture_dump_data_str_cb(const char *buf, void *private_data)
        do { uint64_t __got = (got), __expected = (expected); \
        if (__got != __expected) { \
                torture_result(torture_ctx, TORTURE_FAIL, \
-                       __location__": "#got" was %llu (0x%llX), expected %llu (0x%llX): %s", \
-                       (unsigned long long)__got, (unsigned long long)__got, \
-                       (unsigned long long)__expected, (unsigned long long)__expected, \
+                       __location__": "#got" was %"PRIu64" (0x%"PRIX64"), expected %"PRIu64" (0x%"PRIX64"): %s", \
+                       __got, __got, \
+                       __expected, __expected, \
                        cmt); \
                return false; \
        } \
@@ -621,9 +621,9 @@ static inline void torture_dump_data_str_cb(const char *buf, void *private_data)
        do { uint64_t __got = (got), __expected = (expected); \
        if (__got != __expected) { \
                torture_result(torture_ctx, TORTURE_FAIL, \
-                       __location__": "#got" was %llu (0x%llX), expected %llu (0x%llX): %s", \
-                       (unsigned long long)__got, (unsigned long long)__got, \
-                       (unsigned long long)__expected, (unsigned long long)__expected, \
+                       __location__": "#got" was %"PRIu64" (0x%"PRIX64"), expected %"PRIu64" (0x%"PRIX64"): %s", \
+                       __got, __got, \
+                       __expected, __expected, \
                        cmt); \
                ret = false; \
                goto label; \
@@ -634,8 +634,8 @@ static inline void torture_dump_data_str_cb(const char *buf, void *private_data)
        do { uint64_t __got = (got), __not_expected = (not_expected); \
        if (__got == __not_expected) { \
                torture_result(torture_ctx, TORTURE_FAIL, \
-                       __location__": "#got" was %llu (0x%llX), expected a different number: %s", \
-                       (unsigned long long)__got, (unsigned long long)__got, \
+                       __location__": "#got" was %"PRIu64" (0x%"PRIX64"), expected a different number: %s", \
+                       __got, __got, \
                        cmt); \
                return false; \
        } \
@@ -645,8 +645,8 @@ static inline void torture_dump_data_str_cb(const char *buf, void *private_data)
        do { uint64_t __got = (got), __not_expected = (not_expected); \
        if (__got == __not_expected) { \
                torture_result(torture_ctx, TORTURE_FAIL, \
-                       __location__": "#got" was %llu (0x%llX), expected a different number: %s", \
-                       (unsigned long long)__got, (unsigned long long)__got, \
+                       __location__": "#got" was %"PRIu64" (0x%"PRIX64"), expected a different number: %s", \
+                       __got, __got, \
                        cmt); \
                ret = false; \
                goto label; \