Skip to content

Commit 4e4ed01

Browse files
committed
ethtool: initialize some variables to shut up gcc
python-ethtool/ethtool.c: In function 'get_tso': python-ethtool/ethtool.c:480: warning: 'value' may be used uninitialized in this function Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
1 parent 0207ecb commit 4e4ed01

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

python-ethtool/ethtool.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -477,7 +477,7 @@ static int dev_set_int_value(int cmd, PyObject *args)
477477

478478
static PyObject *get_tso(PyObject *self __unused, PyObject *args)
479479
{
480-
int value;
480+
int value = 0;
481481

482482
if (get_dev_int_value(ETHTOOL_GTSO, args, &value) < 0)
483483
return NULL;
@@ -496,7 +496,7 @@ static PyObject *set_tso(PyObject *self __unused, PyObject *args)
496496

497497
static PyObject *get_ufo(PyObject *self __unused, PyObject *args)
498498
{
499-
int value;
499+
int value = 0;
500500

501501
if (get_dev_int_value(ETHTOOL_GUFO, args, &value) < 0)
502502
return NULL;
@@ -506,7 +506,7 @@ static PyObject *get_ufo(PyObject *self __unused, PyObject *args)
506506

507507
static PyObject *get_gso(PyObject *self __unused, PyObject *args)
508508
{
509-
int value;
509+
int value = 0;
510510

511511
if (get_dev_int_value(ETHTOOL_GGSO, args, &value) < 0)
512512
return NULL;
@@ -516,7 +516,7 @@ static PyObject *get_gso(PyObject *self __unused, PyObject *args)
516516

517517
static PyObject *get_sg(PyObject *self __unused, PyObject *args)
518518
{
519-
int value;
519+
int value = 0;
520520

521521
if (get_dev_int_value(ETHTOOL_GSG, args, &value) < 0)
522522
return NULL;

0 commit comments

Comments
 (0)