diff options
author | Mattias Andrée <maandree@operamail.com> | 2015-08-27 14:03:11 +0200 |
---|---|---|
committer | Mattias Andrée <maandree@operamail.com> | 2015-08-27 14:03:11 +0200 |
commit | 2373237a74a8af3faff7f325a91494e738d5e0fd (patch) | |
tree | d9fa9471584369af647a03e86b2cfa1058e8ebb6 /src/cmdline.c | |
parent | update dist (diff) | |
download | bus-2373237a74a8af3faff7f325a91494e738d5e0fd.tar.gz bus-2373237a74a8af3faff7f325a91494e738d5e0fd.tar.bz2 bus-2373237a74a8af3faff7f325a91494e738d5e0fd.tar.xz |
fix warnings
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to 'src/cmdline.c')
-rw-r--r-- | src/cmdline.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/cmdline.c b/src/cmdline.c index 97da729..25939cb 100644 --- a/src/cmdline.c +++ b/src/cmdline.c @@ -118,7 +118,7 @@ parse_mode(const char *str, mode_t *andnot, mode_t *or) int numerical = 1; mode_t mode = 0; char op = '='; - int bits; + mode_t bits; *andnot = 0; *or = 0; @@ -139,9 +139,9 @@ parse_mode(const char *str, mode_t *andnot, mode_t *or) *andnot = U | G | O; *or = mode; *or &= U | G | O; - *or = (*or & U) ? (*or | U) : (*or & ~U); - *or = (*or & G) ? (*or | G) : (*or & ~G); - *or = (*or & O) ? (*or | O) : (*or & ~O); + *or = (*or & U) ? (*or | U) : (*or & (mode_t)~U); + *or = (*or & G) ? (*or | G) : (*or & (mode_t)~G); + *or = (*or & O) ? (*or | O) : (*or & (mode_t)~O); return 0; } @@ -314,7 +314,7 @@ main(int argc, char *argv[]) mode_t mode_andnot, mode_or; int opt_x = 0, opt_n = 0; const char *arg; - char **nonoptv = alloca(argc * sizeof(char*)); + char **nonoptv = alloca((size_t)argc * sizeof(char*)); int nonoptc = 0; argv0 = *argv++; |