From 98e6c8de58e960b05eeb1601710ab29b9d5019ef Mon Sep 17 00:00:00 2001 From: Richard Cochran Date: Fri, 6 Apr 2018 08:49:16 -0700 Subject: [PATCH] sk: Silence gcc warning about unused variable. When compiling with "-O1 -D_FORTIFY_SOURCE=1", gcc throws a false positive warning. The code is not performance sensitive, so this patch silences the warning by initializing the offending local variable explicitly. Signed-off-by: Richard Cochran --- sk.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sk.c b/sk.c index 9c98c1d..f18b2bf 100644 --- a/sk.c +++ b/sk.c @@ -395,7 +395,7 @@ int sk_set_priority(int fd, uint8_t dscp) int sk_timestamping_init(int fd, const char *device, enum timestamp_type type, enum transport_type transport) { - int err, filter1, filter2 = 0, flags, tx_type; + int err, filter1, filter2 = 0, flags, tx_type = HWTSTAMP_TX_ON; switch (type) { case TS_SOFTWARE: