[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-trivial] [PULL 13/14] util/path: Fix type which is longer than 8 b
From: |
Michael Tokarev |
Subject: |
[Qemu-trivial] [PULL 13/14] util/path: Fix type which is longer than 8 bit for MinGW |
Date: |
Sun, 6 Oct 2013 13:32:58 +0400 |
From: Stefan Weil <address@hidden>
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 <address@hidden>
Signed-off-by: Michael Tokarev <address@hidden>
---
util/path.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/util/path.c b/util/path.c
index f0c6962..623219e 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;
--
1.7.10.4
- [Qemu-trivial] [PULL 06/14] target-i386: Fix compiler warning (integer constant is too large), (continued)
- [Qemu-trivial] [PULL 06/14] target-i386: Fix compiler warning (integer constant is too large), Michael Tokarev, 2013/10/06
- [Qemu-trivial] [PULL 14/14] migration: Fix compiler warning ('caps' may be used uninitialized), Michael Tokarev, 2013/10/06
- [Qemu-trivial] [PULL 12/14] hw/9pfs: Fix errno value for xattr functions, Michael Tokarev, 2013/10/06
- [Qemu-trivial] [PULL 11/14] vl: Clean up unnecessary boot_order complications, Michael Tokarev, 2013/10/06
- [Qemu-trivial] [PULL 03/14] tests: Fix schema parser test for in-tree build, Michael Tokarev, 2013/10/06
- [Qemu-trivial] [PULL 05/14] block: Remove unused assignment (fixes warning from clang), Michael Tokarev, 2013/10/06
- [Qemu-trivial] [PULL 01/14] .gitignore: ignore tests/qemu-iotests/socket_scm_helper, Michael Tokarev, 2013/10/06
- [Qemu-trivial] [PULL 07/14] hw/alpha: Fix compiler warning (integer constant is too large), Michael Tokarev, 2013/10/06
- [Qemu-trivial] [PULL 09/14] pci-ohci: Add missing 'break' in ohci_service_td, Michael Tokarev, 2013/10/06
- [Qemu-trivial] [PULL 04/14] exec: cleanup DEBUG_SUBPAGE, Michael Tokarev, 2013/10/06
- [Qemu-trivial] [PULL 13/14] util/path: Fix type which is longer than 8 bit for MinGW,
Michael Tokarev <=
- [Qemu-trivial] [PULL 10/14] qemu-char: Fix potential out of bounds access to local arrays, Michael Tokarev, 2013/10/06