logo

oasis

Own branch of Oasis Linux (upstream: <https://git.sr.ht/~mcf/oasis/>) git clone https://anongit.hacktivis.me/git/oasis.git

0006-Avoid-empty-initializers.patch (1075B)


  1. From 323a274d3f02819891156b1e5827f810b6642ae2 Mon Sep 17 00:00:00 2001
  2. From: Michael Forney <mforney@mforney.org>
  3. Date: Wed, 4 Mar 2026 14:26:50 -0800
  4. Subject: [PATCH] Avoid empty initializers
  5. These are standard as of C23, but fix it anyway to avoid -Wpedantic
  6. warnings on older gcc versions.
  7. ---
  8. utils.c | 4 ++--
  9. 1 file changed, 2 insertions(+), 2 deletions(-)
  10. diff --git a/utils.c b/utils.c
  11. index ffe0a0d..c843599 100644
  12. --- a/utils.c
  13. +++ b/utils.c
  14. @@ -756,7 +756,7 @@ void
  15. send_pid_on_socket (int sockfd)
  16. {
  17. char buf[1] = { 0 };
  18. - struct msghdr msg = {};
  19. + struct msghdr msg = { 0 };
  20. struct iovec iov = { buf, sizeof (buf) };
  21. _Alignas(struct cmsghdr) char control_buf_snd[CMSG_SPACE(sizeof(struct ucred))];
  22. struct cmsghdr *cmsg;
  23. @@ -797,7 +797,7 @@ int
  24. read_pid_from_socket (int sockfd)
  25. {
  26. char recv_buf[1] = { 0 };
  27. - struct msghdr msg = {};
  28. + struct msghdr msg = { 0 };
  29. struct iovec iov = { recv_buf, sizeof (recv_buf) };
  30. _Alignas(struct cmsghdr) char control_buf_rcv[CMSG_SPACE(sizeof(struct ucred))];
  31. struct cmsghdr* cmsg;
  32. --
  33. 2.49.0