Ignore:
Timestamp:
Mar 15, 2018, 1:00:09 AM (7 years ago)
Author:
bird
Message:

kmk: warnings found by gcc 7.3.0

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/kmk/kmkbuiltin/fts.c

    r3109 r3145  
    14241424
    14251425#ifdef HAVE_FCHDIR
    1426         if (oldfd < 0 && (fd = open(path, O_RDONLY)) == -1)
    1427                 return -1;
     1426        if (oldfd < 0) {
     1427                if (!path) /* shuts up gcc nonull checks*/
     1428                        return -1;
     1429                fd = open(path, O_RDONLY);
     1430                if (fd == -1)
     1431                        return -1;
     1432        }
    14281433
    14291434        if (fstat(fd, &sb) == -1)
Note: See TracChangeset for help on using the changeset viewer.