All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Wagner <wagi@monom.org>
To: connman@lists.linux.dev
Cc: Daniel Wagner <wagi@monom.org>
Subject: [PATCH v1 1/3] build: Only enable -Wcast-align for gcc
Date: Tue, 12 Oct 2021 09:06:46 +0200	[thread overview]
Message-ID: <20211012070648.28947-2-wagi@monom.org> (raw)
In-Reply-To: <20211012070648.28947-1-wagi@monom.org>

clang -Wcast-align is very unhappy with various alignments of external
data structures and access helper such as CMSG_DATA. While its
worthwhile to fix these in the long run, let's disable the cast-align
warning for the time. This aligns it with iwd.
---
 acinclude.m4 | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/acinclude.m4 b/acinclude.m4
index 9e8e0dc5e8b2..262465d8085d 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -21,7 +21,9 @@ AC_DEFUN([COMPILER_FLAGS], [
 		CFLAGS+=" -Wdeclaration-after-statement"
 		CFLAGS+=" -Wmissing-declarations"
 		CFLAGS+=" -Wredundant-decls"
-		CFLAGS+=" -Wcast-align"
+                if ( $CC -v 2>/dev/null | grep "gcc version" ); then
+                        CFLAGS+=" -Wcast-align"
+                fi
 		CFLAGS="$CFLAGS -DG_DISABLE_DEPRECATED"
 	fi
 ])
-- 
2.33.0


  reply	other threads:[~2021-10-12  7:07 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-12  7:06 [PATCH v1 0/3] Fixup clang error messages Daniel Wagner
2021-10-12  7:06 ` Daniel Wagner [this message]
2021-10-12  7:06 ` [PATCH v1 2/3] inet: Remove unused ipv6_addr_advert_mult Daniel Wagner
2021-10-12  7:06 ` [PATCH v1 3/3] gsupplicant: Fix error return type Daniel Wagner
2021-10-15  7:03 ` [PATCH v1 0/3] Fixup clang error messages Daniel Wagner
2021-10-15  8:55 ` VAUTRIN Emmanuel (Canal Plus Prestataire)
2021-10-15  9:25   ` Daniel Wagner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20211012070648.28947-2-wagi@monom.org \
    --to=wagi@monom.org \
    --cc=connman@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.