This is the mail archive of the
libc-help@sourceware.org
mailing list for the glibc project.
Re: statx struct's stx_size pointer compatibility with uint64_t/size_t
- From: David Howells <dhowells at redhat dot com>
- To: Dominique Martinet <asmadeus at codewreck dot org>
- Cc: dhowells at redhat dot com, libc-help at sourceware dot org, Quentin Bouget <quentin dot bouget at cea dot fr>, Jeff Layton <jlayton at kernel dot org>
- Date: Tue, 17 Dec 2019 18:13:18 +0000
- Subject: Re: statx struct's stx_size pointer compatibility with uint64_t/size_t
- References: <20191217085918.GA19084@nautica>
Dominique Martinet <asmadeus@codewreck.org> wrote:
> A coworker ran into an incompatible-pointer-type compiler warning when
> trying to pass &statxbuf.stx_size to a function expecting a size_t,
> which boils down to this:
sizeof(size_t) != sizeof(__u64) on some arches, so you can't simply
interchange them. But that's not what your example code is doing.
David