diff options
author | Flavio Cruz <flaviocruz@gmail.com> | 2023-12-29 16:20:57 -0500 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2023-12-29 22:32:06 +0100 |
commit | ca25d072393167164657770091b8b58f0183eb59 (patch) | |
tree | b8d443e0d9a57dd5672441e3914684111d09d562 /libfshelp-tests | |
parent | 1eee1e2c72bbe0c1351fdc2a0ac3e456eb2cc2ca (diff) | |
download | hurd-ca25d072393167164657770091b8b58f0183eb59.tar.gz hurd-ca25d072393167164657770091b8b58f0183eb59.tar.bz2 hurd-ca25d072393167164657770091b8b58f0183eb59.zip |
Use mach_msg_type_number_t whenever required to avoid warnings
Message-ID: <20231229212105.858759-3-flaviocruz@gmail.com>
Diffstat (limited to 'libfshelp-tests')
-rw-r--r-- | libfshelp-tests/race.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/libfshelp-tests/race.c b/libfshelp-tests/race.c index 376ada23..e1df2966 100644 --- a/libfshelp-tests/race.c +++ b/libfshelp-tests/race.c @@ -33,7 +33,8 @@ int main (int argc, char **argv) mach_port_t rendezvous = MACH_PORT_NULL; int fd; int i; - mach_msg_type_number_t v; + mach_msg_type_number_t n_read; + vm_size_t v; int blocked = 0; char buf[10] = ""; char *bufp; @@ -61,12 +62,12 @@ int main (int argc, char **argv) if (err) error (1, err, "file_record_lock"); - v = sizeof (buf); + v = n_read = sizeof (buf); bufp = buf; - io_read (fd, &bufp, &v, 0, v); + io_read (fd, &bufp, &n_read, 0, v); v = atoi (bufp); - sprintf (buf, "%d\n", v + 1); + sprintf (buf, "%d\n", (int) (v + 1)); v = 10; io_write (fd, buf, sizeof (buf), 0, &v); |