summaryrefslogtreecommitdiff
path: root/lib/careadlinkat.c
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2020-12-25 02:33:29 -0800
committerPaul Eggert <eggert@cs.ucla.edu>2020-12-25 02:36:03 -0800
commit42d58264db165d265cba68d6dbebc53a50738355 (patch)
tree87543f2f0992a6b57a34dbd6ee04f48c3f6e7486 /lib/careadlinkat.c
parent5880c7caab394eac55c44d4be42b2f45dbd9bc53 (diff)
downloademacs-42d58264db165d265cba68d6dbebc53a50738355.tar.gz
Update Gnulib.
All changes in this commit are autogenerated by running admin/merge-gnulib.
Diffstat (limited to 'lib/careadlinkat.c')
-rw-r--r--lib/careadlinkat.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/careadlinkat.c b/lib/careadlinkat.c
index 26fe84df55e..6aaa712b9be 100644
--- a/lib/careadlinkat.c
+++ b/lib/careadlinkat.c
@@ -55,8 +55,7 @@ enum { STACK_BUF_SIZE = 1024 };
# if defined GCC_LINT || defined lint
__attribute__ ((__noinline__))
# elif __OPTIMIZE__ && !__NO_INLINE__
-# warning "GCC might issue a bogus -Wreturn-local-addr warning here."
-# warning "See <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93644>."
+# define GCC_BOGUS_WRETURN_LOCAL_ADDR
# endif
#endif
static char *
@@ -180,10 +179,11 @@ careadlinkat (int fd, char const *filename,
/* Allocate the initial buffer on the stack. This way, in the
common case of a symlink of small size, we get away with a
single small malloc instead of a big malloc followed by a
- shrinking realloc.
-
- If GCC -Wreturn-local-addr warns about this buffer, the warning
- is bogus; see readlink_stk. */
+ shrinking realloc. */
+ #ifdef GCC_BOGUS_WRETURN_LOCAL_ADDR
+ #warning "GCC might issue a bogus -Wreturn-local-addr warning here."
+ #warning "See <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93644>."
+ #endif
char stack_buf[STACK_BUF_SIZE];
return readlink_stk (fd, filename, buffer, buffer_size, alloc,
preadlinkat, stack_buf);