[pacman-dev] [PATCH] Silence new warning with gcc-11

Allan McRae allan at archlinux.org
Mon May 17 07:09:27 UTC 2021


Signed-off-by: Allan McRae <allan at archlinux.org>
---
 src/pacman/callback.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/pacman/callback.c b/src/pacman/callback.c
index 99ad716e..75c74f8b 100644
--- a/src/pacman/callback.c
+++ b/src/pacman/callback.c
@@ -677,7 +677,7 @@ void cb_progress(void *ctx, alpm_progress_t event, const char *pkgname,
 		int i = textlen - 3;
 		wchar_t *p = wcstr;
 		/* grab the max number of char columns we can fill */
-		while(i - wcwidth(*p) > 0) {
+		while(i > wcwidth(*p)) {
 			i -= wcwidth(*p);
 			p++;
 		}
-- 
2.31.1


More information about the pacman-dev mailing list