mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-06-05 04:10:07 +02:00
gmessages: Fix -Wshorten-64-to-32 warning with socklen_t
`socklen_t` is defined as an `int`, but we’re putting a `size_t` sized value into it. Socket paths are guaranteed to fit in a `socklen_t`, so it’s OK to cast down. Signed-off-by: Philip Withnall <pwithnall@gnome.org> Helps: #3527
This commit is contained in:
parent
3edd005dab
commit
38d7e7e663
@ -2383,7 +2383,7 @@ journal_sendv (struct iovec *iov,
|
||||
|
||||
memset (&mh, 0, sizeof (mh));
|
||||
mh.msg_name = &sa;
|
||||
mh.msg_namelen = offsetof (struct sockaddr_un, sun_path) + strlen (sa.sun_path);
|
||||
mh.msg_namelen = offsetof (struct sockaddr_un, sun_path) + (socklen_t) strlen (sa.sun_path);
|
||||
mh.msg_iov = iov;
|
||||
mh.msg_iovlen = iovlen;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user