mirror of
https://github.com/moparisthebest/pacman
synced 2025-01-08 12:28:00 -05:00
Do not compare signed and unsigned types
The casting of nread is safe as it is tested to be >0 when it is initally assigned. It is also being implicitly cast in the fwrite call in the line above. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
This commit is contained in:
parent
630e7508ee
commit
081e6a8360
@ -251,7 +251,7 @@ static int download_internal(const char *url, const char *localpath,
|
||||
check_stop();
|
||||
size_t nwritten = 0;
|
||||
nwritten = fwrite(buffer, 1, nread, localf);
|
||||
if((nwritten != nread) || ferror(localf)) {
|
||||
if((nwritten != (size_t)nread) || ferror(localf)) {
|
||||
pm_errno = PM_ERR_RETRIEVE;
|
||||
_alpm_log(PM_LOG_ERROR, _("error writing to file '%s': %s\n"),
|
||||
tempfile, strerror(errno));
|
||||
|
@ -989,7 +989,7 @@ static int _parseconfig(const char *file, const char *givensection,
|
||||
file, linenum, value);
|
||||
break;
|
||||
default:
|
||||
for(int gindex = 0; gindex < globbuf.gl_pathc; gindex++) {
|
||||
for(size_t gindex = 0; gindex < globbuf.gl_pathc; gindex++) {
|
||||
pm_printf(PM_LOG_DEBUG, "config file %s, line %d: including %s\n",
|
||||
file, linenum, globbuf.gl_pathv[gindex]);
|
||||
_parseconfig(globbuf.gl_pathv[gindex], section, db);
|
||||
|
Loading…
Reference in New Issue
Block a user