summaryrefslogtreecommitdiff
path: root/app-editors/nvi/files/nvi-1.81.6-printf-types.patch
blob: 20fc47c18f256e5dd69d6ec39a3511e26d773510 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
lno and last are uint32_t which might be different from unsigned long

--- a/common/msg.c
+++ b/common/msg.c
@@ -640,7 +640,8 @@ msgq_status(SCR *sp, db_recno_t lno, u_i
 			p += len;
 		} else {
 			t = msg_cat(sp, "027|line %lu of %lu [%ld%%]", &len);
-			(void)sprintf(p, t, lno, last, (lno * 100) / last);
+			(void)sprintf(p, t, (u_long)lno, (u_long)last,
+					((long)lno * 100L) / (long)last);
 			p += strlen(p);
 		}
 	} else {