Message ID | 1454912425-14888-1-git-send-email-maxim.uvarov@linaro.org |
---|---|
State | Accepted |
Commit | df85537f7c57cb2e39f865b5c0081bfac8697253 |
Headers | show |
That is for api-next. Maxim. On 02/08/2016 09:20, Maxim Uvarov wrote: > CI got following error: > pktio.c: In function 'pktio_test_recv_queue': > pktio.c:643:11: error: 'pktio[0]' may be used uninitialized > in this function [-Werror=maybe-uninitialized] > pktio_tx = pktio[0] > > That can never happen due to num_ifaces always > 1 in our test. > Add special check for that to make new gcc happy. > > Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> > --- > I can not reproduce that warning. But this patch should to remove it. > > Maxim. > > > test/validation/pktio/pktio.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/test/validation/pktio/pktio.c b/test/validation/pktio/pktio.c > index 980b092..f3577ec 100644 > --- a/test/validation/pktio/pktio.c > +++ b/test/validation/pktio/pktio.c > @@ -611,6 +611,8 @@ void pktio_test_recv_queue(void) > int ret; > int i; > > + CU_ASSERT_FATAL(num_ifaces >= 1); > + > /* Open and configure interfaces */ > for (i = 0; i < num_ifaces; ++i) { > pktio[i] = create_pktio(i, ODP_PKTIN_MODE_DIRECT,
Merged, Maxim. On 02/08/2016 16:28, Christophe Milard wrote: > On 2016-02-08 09:20, Maxim Uvarov wrote: >> CI got following error: >> pktio.c: In function 'pktio_test_recv_queue': >> pktio.c:643:11: error: 'pktio[0]' may be used uninitialized >> in this function [-Werror=maybe-uninitialized] >> pktio_tx = pktio[0] >> >> That can never happen due to num_ifaces always > 1 in our test. >> Add special check for that to make new gcc happy. >> >> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> > For api-next: > Reviewed-by: Christophe Milard <christophe.milard@linaro.org> > >> --- >> I can not reproduce that warning. But this patch should to remove it. >> >> Maxim. >> >> >> test/validation/pktio/pktio.c | 2 ++ >> 1 file changed, 2 insertions(+) >> >> diff --git a/test/validation/pktio/pktio.c b/test/validation/pktio/pktio.c >> index 980b092..f3577ec 100644 >> --- a/test/validation/pktio/pktio.c >> +++ b/test/validation/pktio/pktio.c >> @@ -611,6 +611,8 @@ void pktio_test_recv_queue(void) >> int ret; >> int i; >> >> + CU_ASSERT_FATAL(num_ifaces >= 1); >> + >> /* Open and configure interfaces */ >> for (i = 0; i < num_ifaces; ++i) { >> pktio[i] = create_pktio(i, ODP_PKTIN_MODE_DIRECT, >> -- >> 1.9.1 >> >> _______________________________________________ >> lng-odp mailing list >> lng-odp@lists.linaro.org >> https://lists.linaro.org/mailman/listinfo/lng-odp
On 2016-02-08 09:20, Maxim Uvarov wrote: > CI got following error: > pktio.c: In function 'pktio_test_recv_queue': > pktio.c:643:11: error: 'pktio[0]' may be used uninitialized > in this function [-Werror=maybe-uninitialized] > pktio_tx = pktio[0] > > That can never happen due to num_ifaces always > 1 in our test. > Add special check for that to make new gcc happy. > > Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> For api-next: Reviewed-by: Christophe Milard <christophe.milard@linaro.org> > --- > I can not reproduce that warning. But this patch should to remove it. > > Maxim. > > > test/validation/pktio/pktio.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/test/validation/pktio/pktio.c b/test/validation/pktio/pktio.c > index 980b092..f3577ec 100644 > --- a/test/validation/pktio/pktio.c > +++ b/test/validation/pktio/pktio.c > @@ -611,6 +611,8 @@ void pktio_test_recv_queue(void) > int ret; > int i; > > + CU_ASSERT_FATAL(num_ifaces >= 1); > + > /* Open and configure interfaces */ > for (i = 0; i < num_ifaces; ++i) { > pktio[i] = create_pktio(i, ODP_PKTIN_MODE_DIRECT, > -- > 1.9.1 > > _______________________________________________ > lng-odp mailing list > lng-odp@lists.linaro.org > https://lists.linaro.org/mailman/listinfo/lng-odp
diff --git a/test/validation/pktio/pktio.c b/test/validation/pktio/pktio.c index 980b092..f3577ec 100644 --- a/test/validation/pktio/pktio.c +++ b/test/validation/pktio/pktio.c @@ -611,6 +611,8 @@ void pktio_test_recv_queue(void) int ret; int i; + CU_ASSERT_FATAL(num_ifaces >= 1); + /* Open and configure interfaces */ for (i = 0; i < num_ifaces; ++i) { pktio[i] = create_pktio(i, ODP_PKTIN_MODE_DIRECT,
CI got following error: pktio.c: In function 'pktio_test_recv_queue': pktio.c:643:11: error: 'pktio[0]' may be used uninitialized in this function [-Werror=maybe-uninitialized] pktio_tx = pktio[0] That can never happen due to num_ifaces always > 1 in our test. Add special check for that to make new gcc happy. Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> --- I can not reproduce that warning. But this patch should to remove it. Maxim. test/validation/pktio/pktio.c | 2 ++ 1 file changed, 2 insertions(+)