mirror of
https://github.com/opnsense/src.git
synced 2026-06-09 08:43:19 -04:00
Fix -Wformat errors in pfctl on 32-bit architectures
Use PRIu64 to printf(3) uint64_t quantities, otherwise this will result in "error: format specifies type 'unsigned long' but the argument has type 'uint64_t' (aka 'unsigned long long') [-Werror,-Wformat]" on 32-bit architectures. Fixes:80078d9d38MFC after: 1 week (cherry picked from commit5b8f07b12f)
This commit is contained in:
parent
7c544989af
commit
a80a3afc3b
1 changed files with 2 additions and 2 deletions
|
|
@ -578,7 +578,7 @@ print_status(struct pfctl_status *s, struct pfctl_syncookies *cookies, int opts)
|
|||
printf("%-27s %14s %16s\n", "State Table", "Total", "Rate");
|
||||
printf(" %-25s %14" PRIu64 " %14s\n", "current entries", s->states, "");
|
||||
TAILQ_FOREACH(c, &s->fcounters, entry) {
|
||||
printf(" %-25s %14lu ", c->name, c->counter);
|
||||
printf(" %-25s %14" PRIu64 " ", c->name, c->counter);
|
||||
if (runtime > 0)
|
||||
printf("%14.1f/s\n",
|
||||
(double)c->counter / (double)runtime);
|
||||
|
|
@ -590,7 +590,7 @@ print_status(struct pfctl_status *s, struct pfctl_syncookies *cookies, int opts)
|
|||
printf(" %-25s %14" PRIu64 " %14s\n", "current entries",
|
||||
s->src_nodes, "");
|
||||
TAILQ_FOREACH(c, &s->scounters, entry) {
|
||||
printf(" %-25s %14lu ", c->name, c->counter);
|
||||
printf(" %-25s %14" PRIu64 " ", c->name, c->counter);
|
||||
if (runtime > 0)
|
||||
printf("%14.1f/s\n",
|
||||
(double)c->counter / (double)runtime);
|
||||
|
|
|
|||
Loading…
Reference in a new issue