Petr Kulhavy
2017-05-21 20:32:10 UTC
Fix "may be used uninitialized in this function" warnings for state and
timestamping.
Signed-off-by: Petr Kulhavy <***@jikos.cz>
---
phc2sys.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/phc2sys.c b/phc2sys.c
index 4c8b552..f3cfed8 100644
--- a/phc2sys.c
+++ b/phc2sys.c
@@ -1037,7 +1037,7 @@ static int auto_init_ports(struct node *node, int add_rt)
struct clock *clock;
int number_ports, res;
unsigned int i;
- int state, timestamping;
+ int state = 0, timestamping = 0;
char iface[IFNAMSIZ];
while (1) {
timestamping.
Signed-off-by: Petr Kulhavy <***@jikos.cz>
---
phc2sys.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/phc2sys.c b/phc2sys.c
index 4c8b552..f3cfed8 100644
--- a/phc2sys.c
+++ b/phc2sys.c
@@ -1037,7 +1037,7 @@ static int auto_init_ports(struct node *node, int add_rt)
struct clock *clock;
int number_ports, res;
unsigned int i;
- int state, timestamping;
+ int state = 0, timestamping = 0;
char iface[IFNAMSIZ];
while (1) {
--
2.7.4
2.7.4