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 <richardcochran@gmail.com>
master
Richard Cochran 2018-04-06 08:49:16 -07:00
parent 73c4d9a3c7
commit 98e6c8de58
1 changed files with 1 additions and 1 deletions

2
sk.c
View File

@ -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, int sk_timestamping_init(int fd, const char *device, enum timestamp_type type,
enum transport_type transport) 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) { switch (type) {
case TS_SOFTWARE: case TS_SOFTWARE: