diff options
author | Dan McGee <dan@archlinux.org> | 2011-01-08 04:06:06 +0100 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2011-01-08 04:15:47 +0100 |
commit | 62f5da377920c4e7823c4f8b8fb3673c9c2739e9 (patch) | |
tree | 3496e43e7161e765680daac4f0f56efe1dae754b /src/pacman/pacman.c | |
parent | f966f3a8344cd96bd675c79a5c470c66920b890c (diff) | |
download | pacman-62f5da377920c4e7823c4f8b8fb3673c9c2739e9.tar.gz pacman-62f5da377920c4e7823c4f8b8fb3673c9c2739e9.tar.xz |
Fix some more simple conversion "errors"
None of these warn at the normal "-Wall -Werror" level, but casts do occur
that we are fine with. Make them explicit to silence some warnings when
using "-Wconversion".
Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'src/pacman/pacman.c')
-rw-r--r-- | src/pacman/pacman.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/pacman/pacman.c b/src/pacman/pacman.c index 12b3810d..c33c5804 100644 --- a/src/pacman/pacman.c +++ b/src/pacman/pacman.c @@ -461,7 +461,7 @@ static int parsearg_global(int opt) case OP_ASK: check_optarg(); config->noask = 1; - config->ask = atoi(optarg); + config->ask = (unsigned int)atoi(optarg); break; case OP_CACHEDIR: check_optarg(); @@ -483,7 +483,7 @@ static int parsearg_global(int opt) * here, error and warning are set in config_new, though perhaps a * --quiet option will remove these later */ if(optarg) { - unsigned short debug = atoi(optarg); + unsigned short debug = (unsigned short)atoi(optarg); switch(debug) { case 2: config->logmask |= PM_LOG_FUNCTION; /* fall through */ @@ -1356,7 +1356,7 @@ int main(int argc, char *argv[]) if(!isatty(fileno(stdin))) { char line[PATH_MAX]; int i = 0; - while(i < PATH_MAX && (line[i] = fgetc(stdin)) != EOF) { + while(i < PATH_MAX && (line[i] = (char)fgetc(stdin)) != EOF) { if(isspace((unsigned char)line[i])) { /* avoid adding zero length arg when multiple spaces separate args */ if(i > 0) { |