From 4021aac50de4c0c9a997f4ec60075fe9831af33c Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Sun, 19 Aug 2018 12:03:27 +0200 Subject: [PATCH] glob: Fix over-optimization due to attribute __nonnull__. * lib/glob.c (_GL_ARG_NONNULL): Define to empty. --- ChangeLog | 5 +++++ lib/glob.c | 6 ++++++ 2 files changed, 11 insertions(+) diff --git a/ChangeLog b/ChangeLog index a65daf6d8f..0799bd31d0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2018-08-19 Bruno Haible + + glob: Fix over-optimization due to attribute __nonnull__. + * lib/glob.c (_GL_ARG_NONNULL): Define to empty. + 2018-08-19 Bruno Haible glob: Fix another compilation error when glob.h is not replaced. diff --git a/lib/glob.c b/lib/glob.c index 17ec19ab5c..b40474d207 100644 --- a/lib/glob.c +++ b/lib/glob.c @@ -16,7 +16,13 @@ . */ #ifndef _LIBC + +/* Don't use __attribute__ __nonnull__ in this compilation unit. Otherwise gcc + optimizes away the pattern == NULL test below. */ +# define _GL_ARG_NONNULL(params) + # include + #endif #include -- 2.39.5