]> Savannah Git Hosting - gnulib.git/commitdiff
mgetgroups: avoid warning with clang
authorPádraig Brady <P@draigBrady.com>
Mon, 9 Nov 2020 13:12:31 +0000 (13:12 +0000)
committerPádraig Brady <P@draigBrady.com>
Mon, 9 Nov 2020 18:29:09 +0000 (18:29 +0000)
* lib/mgetgroups.c: Xcode-12.1 identifies as GCC 4.2.1,
so disable -Wpointer-sign for all clang versions.

ChangeLog
lib/mgetgroups.c

index 90169c0595208489dfa652df3b80000774337623..a5999557bce0aeda09a41653cd0ccca53c93f55c 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2020-11-09  Pádraig Brady  <P@draigBrady.com>
+
+       mgetgroups: avoid warning with clang
+       * lib/mgetgroups.c: Xcode-12.1 identifies as GCC 4.2.1,
+       so disable -Wpointer-sign for all clang versions.
+
 2020-11-07  Bruno Haible  <bruno@clisp.org>
 
        gnulib-tool: Fix link error with 'version-etc' (regression 2020-05-29).
index 3377d7bb2281f8f742538d91ca71bd34227e9452..5997e627ebe4889d913f6f41c6b5f5e8da308caa 100644 (file)
@@ -35,7 +35,7 @@
 
 /* Work around an incompatibility of OS X 10.11: getgrouplist
    accepts int *, not gid_t *, and int and gid_t differ in sign.  */
-#if 4 < __GNUC__ + (3 <= __GNUC_MINOR__)
+#if 4 < __GNUC__ + (3 <= __GNUC_MINOR__) || defined __clang__
 # pragma GCC diagnostic ignored "-Wpointer-sign"
 #endif