Fix compiler warnings with gcc-9.1

Signed-off-by: Allan McRae <allan@archlinux.org>
This commit is contained in:
Allan McRae 2019-06-20 16:28:44 +10:00
parent 1a343d378a
commit 4ca5f5949b
3 changed files with 3 additions and 3 deletions

View file

@ -804,7 +804,7 @@ void cb_dl_progress(const char *filename, off_t file_xfered, off_t file_total)
int i = filenamelen - 3; int i = filenamelen - 3;
wchar_t *wcp = wcfname; wchar_t *wcp = wcfname;
/* grab the max number of char columns we can fill */ /* grab the max number of char columns we can fill */
while(i > 0 && wcwidth(*wcp) < i) { while(wcwidth(*wcp) < i) {
i -= wcwidth(*wcp); i -= wcwidth(*wcp);
wcp++; wcp++;
} }

View file

@ -1079,7 +1079,7 @@ static void cl_to_log(int argc, char *argv[])
return; return;
} }
char *p = cl_text; char *p = cl_text;
for(i = 0; i < argc - 1; i++) { for(i = 0; i + 1 < argc; i++) {
strcpy(p, argv[i]); strcpy(p, argv[i]);
p += strlen(argv[i]); p += strlen(argv[i]);
*p++ = ' '; *p++ = ' ';

View file

@ -189,7 +189,7 @@ static int query_fileowner(alpm_list_t *targets)
if(!lrealpath(filename, rpath)) { if(!lrealpath(filename, rpath)) {
/* Can't canonicalize path, try to proceed anyway */ /* Can't canonicalize path, try to proceed anyway */
strncpy(rpath, filename, PATH_MAX); strcpy(rpath, filename);
} }
if(strncmp(rpath, root, rootlen) != 0) { if(strncmp(rpath, root, rootlen) != 0) {