glibc/hurd/hurd
Sergey Bugaev 62d6c33030 mach, hurd: Cast through uintptr_t
When casting between a pointer and an integer of a different size, GCC
emits a warning (which is escalated to a build failure by -Werror).
Indeed, if what you start with is a pointer, which you then cast to a
shorter integer and then back again, you're going to cut off some bits
of the pointer.

But if you start with an integer (such as mach_port_t), then cast it to
a longer pointer (void *), and then back to a shorter integer, you are
fine. To keep GCC happy, cast through an intermediary uintptr_t, which
is always the same size as a pointer.

Signed-off-by: Sergey Bugaev <bugaevc@gmail.com>
Message-Id: <20230212111044.610942-4-bugaevc@gmail.com>
2023-02-12 15:55:04 +01:00
..
fd.h Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
id.h Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
ioctl.h Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
lookup.h Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
port.h mach, hurd: Cast through uintptr_t 2023-02-12 15:55:04 +01:00
resource.h Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
signal.h Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
sigpreempt.h Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
threadvar.h Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
userlink.h Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
xattr.h Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00