mirror of
https://git.proxmox.com/git/mirror_iproute2
synced 2025-10-19 19:35:21 +00:00
fix format warnings
Enable format security, and fix the warning caused by printing with string for format.
This commit is contained in:
parent
f0f4ab600b
commit
4ec0ffde42
2
Makefile
2
Makefile
@ -31,7 +31,7 @@ HOSTCC = gcc
|
|||||||
DEFINES += -D_GNU_SOURCE
|
DEFINES += -D_GNU_SOURCE
|
||||||
CCOPTS = -O2
|
CCOPTS = -O2
|
||||||
WFLAGS := -Wall -Wstrict-prototypes -Wmissing-prototypes
|
WFLAGS := -Wall -Wstrict-prototypes -Wmissing-prototypes
|
||||||
WFLAGS += -Wmissing-declarations -Wold-style-definition
|
WFLAGS += -Wmissing-declarations -Wold-style-definition -Wformat=2
|
||||||
|
|
||||||
CFLAGS = $(WFLAGS) $(CCOPTS) -I../include $(DEFINES)
|
CFLAGS = $(WFLAGS) $(CCOPTS) -I../include $(DEFINES)
|
||||||
YACCFLAGS = -d -t -v
|
YACCFLAGS = -d -t -v
|
||||||
|
@ -357,7 +357,7 @@ static void print_link_stats64(FILE *fp, const struct rtnl_link_stats64 *s,
|
|||||||
fprintf(fp, " TX errors: aborted fifo window heartbeat");
|
fprintf(fp, " TX errors: aborted fifo window heartbeat");
|
||||||
if (carrier_changes)
|
if (carrier_changes)
|
||||||
fprintf(fp, " transns");
|
fprintf(fp, " transns");
|
||||||
fprintf(fp, _SL_);
|
fprintf(fp, "%s", _SL_);
|
||||||
fprintf(fp, " %-7"PRIu64" %-7"PRIu64" %-7"PRIu64" %-8"PRIu64"",
|
fprintf(fp, " %-7"PRIu64" %-7"PRIu64" %-7"PRIu64" %-8"PRIu64"",
|
||||||
(uint64_t)s->tx_aborted_errors,
|
(uint64_t)s->tx_aborted_errors,
|
||||||
(uint64_t)s->tx_fifo_errors,
|
(uint64_t)s->tx_fifo_errors,
|
||||||
@ -406,7 +406,7 @@ static void print_link_stats(FILE *fp, const struct rtnl_link_stats *s,
|
|||||||
fprintf(fp, " TX errors: aborted fifo window heartbeat");
|
fprintf(fp, " TX errors: aborted fifo window heartbeat");
|
||||||
if (carrier_changes)
|
if (carrier_changes)
|
||||||
fprintf(fp, " transns");
|
fprintf(fp, " transns");
|
||||||
fprintf(fp, _SL_);
|
fprintf(fp, "%s", _SL_);
|
||||||
fprintf(fp, " %-7u %-7u %-7u %-8u",
|
fprintf(fp, " %-7u %-7u %-7u %-8u",
|
||||||
s->tx_aborted_errors,
|
s->tx_aborted_errors,
|
||||||
s->tx_fifo_errors,
|
s->tx_fifo_errors,
|
||||||
|
Loading…
Reference in New Issue
Block a user