]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
librpc/ndr: Format NDR pull sizes as ‘size_t’
authorJoseph Sutton <josephsutton@catalyst.net.nz>
Wed, 19 Jul 2023 23:18:14 +0000 (11:18 +1200)
committerAndrew Bartlett <abartlet@samba.org>
Tue, 8 Aug 2023 04:39:36 +0000 (04:39 +0000)
The arguments to these macros are occasionally of type size_t.

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
librpc/ndr/libndr.h

index 556d17f68c7782faa035a99a334548419d07f2a7..2a80ba5df0a3acab519293a9b9bb1041cde12316 100644 (file)
@@ -362,7 +362,7 @@ enum ndr_compression_alg {
                        uint32_t _missing = n - _available; \
                        ndr->relative_highest_offset = _missing; \
                } \
-               return ndr_pull_error(ndr, NDR_ERR_BUFSIZE, "Pull bytes %u (%s)", (unsigned)n, __location__); \
+               return ndr_pull_error(ndr, NDR_ERR_BUFSIZE, "Pull bytes %zu (%s)", (size_t)n, __location__); \
        } \
 } while(0)
 
@@ -380,7 +380,7 @@ enum ndr_compression_alg {
                        return ndr_pull_error( \
                                ndr, \
                                NDR_ERR_BUFSIZE, \
-                               "Pull align (overflow) %u", (unsigned)n); \
+                               "Pull align (overflow) %zu", (size_t)n); \
                } \
                ndr->offset = (ndr->offset + (n-1)) & ~(n-1); \
        } \
@@ -389,7 +389,7 @@ enum ndr_compression_alg {
                        uint32_t _missing = ndr->offset - ndr->data_size; \
                        ndr->relative_highest_offset = _missing; \
                } \
-               return ndr_pull_error(ndr, NDR_ERR_BUFSIZE, "Pull align %u", (unsigned)n); \
+               return ndr_pull_error(ndr, NDR_ERR_BUFSIZE, "Pull align %zu", (size_t)n); \
        } \
 } while(0)