Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAllan McRae <allan@archlinux.org>2019-06-20 16:28:44 +1000
committerAllan McRae <allan@archlinux.org>2019-06-20 16:28:44 +1000
commit4ca5f5949b42f76867f11eec0a5379ed3eb531d2 (patch)
tree203b0b5b0162e9dca1d49fe455702af5b25dff52 /src
parent1a343d378a9e0c4ea143db9e796cf7262eb0d4cb (diff)
Fix compiler warnings with gcc-9.1
Signed-off-by: Allan McRae <allan@archlinux.org>
Diffstat (limited to 'src')
-rw-r--r--src/pacman/callback.c2
-rw-r--r--src/pacman/pacman.c2
-rw-r--r--src/pacman/query.c2
3 files changed, 3 insertions, 3 deletions
diff --git a/src/pacman/callback.c b/src/pacman/callback.c
index 22865614..aa5f521e 100644
--- a/src/pacman/callback.c
+++ b/src/pacman/callback.c
@@ -804,7 +804,7 @@ void cb_dl_progress(const char *filename, off_t file_xfered, off_t file_total)
int i = filenamelen - 3;
wchar_t *wcp = wcfname;
/* grab the max number of char columns we can fill */
- while(i > 0 && wcwidth(*wcp) < i) {
+ while(wcwidth(*wcp) < i) {
i -= wcwidth(*wcp);
wcp++;
}
diff --git a/src/pacman/pacman.c b/src/pacman/pacman.c
index 93fb98a4..b7406cea 100644
--- a/src/pacman/pacman.c
+++ b/src/pacman/pacman.c
@@ -1079,7 +1079,7 @@ static void cl_to_log(int argc, char *argv[])
return;
}
char *p = cl_text;
- for(i = 0; i < argc - 1; i++) {
+ for(i = 0; i + 1 < argc; i++) {
strcpy(p, argv[i]);
p += strlen(argv[i]);
*p++ = ' ';
diff --git a/src/pacman/query.c b/src/pacman/query.c
index 3e728257..de82553c 100644
--- a/src/pacman/query.c
+++ b/src/pacman/query.c
@@ -189,7 +189,7 @@ static int query_fileowner(alpm_list_t *targets)
if(!lrealpath(filename, rpath)) {
/* Can't canonicalize path, try to proceed anyway */
- strncpy(rpath, filename, PATH_MAX);
+ strcpy(rpath, filename);
}
if(strncmp(rpath, root, rootlen) != 0) {