You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gentoo-overlay/app-editors/nvi/files/nvi-1.81.6-printf-types.patch

15 lines
437 B

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 {