diff options
author | Flavio Cruz <flaviocruz@gmail.com> | 2023-12-29 16:21:01 -0500 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2023-12-29 22:42:58 +0100 |
commit | 5a6177067d9758bc65bba52da653ca51ea00589e (patch) | |
tree | 90dadb37cdbd7273c6c6e7f52228dbf07f886fb6 /utils | |
parent | 2d09f077e6c708d0c47b9c8d4c99dcec5268e94f (diff) | |
download | hurd-5a6177067d9758bc65bba52da653ca51ea00589e.tar.gz hurd-5a6177067d9758bc65bba52da653ca51ea00589e.tar.bz2 hurd-5a6177067d9758bc65bba52da653ca51ea00589e.zip |
Fix a few pointer related warnings.
Message-ID: <20231229212105.858759-7-flaviocruz@gmail.com>
Diffstat (limited to 'utils')
-rw-r--r-- | utils/rpctrace.c | 4 | ||||
-rw-r--r-- | utils/vmallocate.c | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/utils/rpctrace.c b/utils/rpctrace.c index 589ce8f8..f7046a0b 100644 --- a/utils/rpctrace.c +++ b/utils/rpctrace.c @@ -810,10 +810,10 @@ print_contents (mach_msg_header_t *inp, int first = 1; /* Process the message data, wrapping ports and printing data. */ - while (msg_buf_ptr < (char *) inp + inp->msgh_size) + while ((char *) msg_buf_ptr < (char *) inp + inp->msgh_size) { mach_msg_type_t *const type = msg_buf_ptr; - mach_msg_type_long_t *const lt = (void *) type; + mach_msg_type_long_t *const lt = (mach_msg_type_long_t *) type; void *data; mach_msg_type_number_t nelt; /* Number of data items. */ mach_msg_type_size_t eltsize; /* Bytes per item. */ diff --git a/utils/vmallocate.c b/utils/vmallocate.c index 039b3097..b7eafed3 100644 --- a/utils/vmallocate.c +++ b/utils/vmallocate.c @@ -207,7 +207,7 @@ main (int argc, char **argv) *p = 1; if (verbose > 1 - && ((unsigned int) (p - address) & ((1U<<20) - 1)) == 0) + && ((uintptr_t) (p - address) & ((1UL<<20) - 1)) == 0) fprintf (stderr, "\r%"PRIu64, allocated + ((uint64_t) (uintptr_t) p - (uint64_t) address)); |