This gcc warning can be silenced:

In file included from minmax.h:39,
                 from file-has-acl.c:32:
/usr/include/x86_64-linux-gnu/sys/param.h:102: warning: "MIN" redefined
  102 | #define MIN(a,b) (((a)<(b))?(a):(b))
      |
In file included from file-has-acl.c:30:
acl-internal.h:56: note: this is the location of the previous definition
   56 | # define MIN(a,b) ((a) < (b) ? (a) : (b))
      |

The only user of this MIN macro is file-has-acl.c, and it already includes
"minmax.h".


2023-09-04  Bruno Haible  <br...@clisp.org>

        file-has-acl: Avoid gcc warning.
        * lib/acl-internal.h (MIN): Remove definition.

diff --git a/lib/acl-internal.h b/lib/acl-internal.h
index 496e41d7b2..f553068647 100644
--- a/lib/acl-internal.h
+++ b/lib/acl-internal.h
@@ -52,9 +52,6 @@ extern int aclsort (int, int, struct acl *);
 #include <errno.h>
 
 #include <limits.h>
-#ifndef MIN
-# define MIN(a,b) ((a) < (b) ? (a) : (b))
-#endif
 
 #ifndef SIZE_MAX
 # define SIZE_MAX ((size_t) -1)




Reply via email to