dvbv5-scan: Fix get_signal logic
authorMauro Carvalho Chehab <mchehab@redhat.com>
Wed, 6 Feb 2013 13:26:27 +0000 (11:26 -0200)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Wed, 6 Feb 2013 13:26:27 +0000 (11:26 -0200)
As reported by Hans Verkuil:

dvbv5-scan.c: In function ‘main’:
dvbv5-scan.c:113:23: warning: ‘i’ may be used uninitialized in this function [-Wuninitialized]
dvbv5-scan.c:97:10: note: ‘i’ was declared here

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
utils/dvb/dvbv5-scan.c

index de44259..f909d4d 100644 (file)
@@ -111,7 +111,7 @@ static int print_frontend_stats(struct dvb_v5_fe_parms *parms)
        dvb_fe_retrieve_stats(parms, DTV_STATUS, &status);
        if (!(status & FE_HAS_LOCK)) {
                dvb_fe_snprintf_stat(parms, DTV_STAT_SIGNAL_STRENGTH, "Signal",
-                                    i, &p, &len, &show);
+                                    0, &p, &len, &show);
 
                fprintf(stderr, "%s: Tuning failed.\n", buf);
                return 0;