* lib/fts.c (enum Fts_stat): Give this previously-anon enum a name.
(fts_read): Use a temporary to narrow the overused st_size member
before using it in a switch statement. Reported by Matthew Woehlke.
2006-11-22 Jim Meyering <jim@meyering.net>
+ Work around a compile-time error from the HP-UX 11.00 /bin/cc.
+ * lib/fts.c (enum Fts_stat): Give this previously-anon enum a name.
+ (fts_read): Use a temporary to narrow the overused st_size member
+ before using it in a switch statement. Reported by Matthew Woehlke.
+
* m4/clock_time.m4 (gl_CLOCK_TIME): Quote AC_SUBST argument.
* m4/euidaccess.m4 (gl_PREREQ_EUIDACCESS): Likewise.
# define DT_MUST_BE(d, t) false
#endif
-enum
+enum Fts_stat
{
FTS_NO_STAT_REQUIRED = 1,
FTS_STAT_REQUIRED = 2
check_for_dir:
if (p->fts_info == FTS_NSOK)
{
- switch (p->fts_statp->st_size)
+ enum Fts_stat need_stat = p->fts_statp->st_size;
+ switch (need_stat)
{
case FTS_STAT_REQUIRED:
p->fts_info = fts_stat(sp, p, false);