]> Savannah Git Hosting - gnulib.git/commit
fts: port to GCC 5.1 with --enable-gcc-warnings
authorPaul Eggert <eggert@cs.ucla.edu>
Mon, 27 Apr 2015 08:19:03 +0000 (01:19 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Mon, 27 Apr 2015 08:24:40 +0000 (01:24 -0700)
commite4584a9e26ea39e2f961a700c60f3a10ec07dbb4
treeb4056aee3400d84f5e4d75b188471c5cbf7fd790
parentff714c0a2094bdefd9ed41603493e66aaf285f12
fts: port to GCC 5.1 with --enable-gcc-warnings

Without this fix, GCC 5.1 (correctly) warns about a subscript
error on the fts_name component of FTSENT.  It's actually a
flexible member, so define it that way on C99 or later hosts.
* lib/fts.c (fts_alloc): Use offsetof, not sizeof, for a
structure that now has a flexible array member.
* lib/fts_.h (__FLEXIBLE_ARRAY_MEMBER): New macro.
(FTSENT): fts_name is now flexible on C99-or-later platforms.
* modules/fts (Depends-on): Add flexmember.
ChangeLog
lib/fts.c
lib/fts_.h
modules/fts