diff options
author | Stefan Weil <sw@weilnetz.de> | 2013-10-02 22:40:29 +0200 |
---|---|---|
committer | Michael Tokarev <mjt@tls.msk.ru> | 2013-10-05 14:01:47 +0400 |
commit | ddd23638d7eebd7419148ba8db65f0d53a1920ab (patch) | |
tree | 95723aebf918260c8f8099feb719643e73c6550e /util/path.c | |
parent | 8af00205445eb901f17ca5b632d976065187538e (diff) |
util/path: Fix type which is longer than 8 bit for MinGW
While dirent->d_type is 8 bit for most systems, it is 32 bit for MinGW.
Reducing it to 8 bit results in a compiler warning because the macro
is_dir_maybe compares that 8 bit value with 32 bit constants.
Using 'unsigned' instead of 'unsigned char' matches the declaration for
MinGW and does not harm the other systems.
MinGW-w64 is not affected: it does not declare d_type.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
Diffstat (limited to 'util/path.c')
-rw-r--r-- | util/path.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/util/path.c b/util/path.c index f0c69627c7..623219e4c5 100644 --- a/util/path.c +++ b/util/path.c @@ -39,7 +39,7 @@ static int strneq(const char *s1, unsigned int n, const char *s2) } static struct pathelem *add_entry(struct pathelem *root, const char *name, - unsigned char type); + unsigned type); static struct pathelem *new_entry(const char *root, struct pathelem *parent, @@ -82,7 +82,7 @@ static struct pathelem *add_dir_maybe(struct pathelem *path) } static struct pathelem *add_entry(struct pathelem *root, const char *name, - unsigned char type) + unsigned type) { struct pathelem **e; |