diff mbox

linux-generic: fix tap compilation

Message ID 1450106804-5140-1-git-send-email-maxim.uvarov@linaro.org
State Accepted
Commit 8e1694d20324ced76e900f8d48cd7d30418b4f94
Headers show

Commit Message

Maxim Uvarov Dec. 14, 2015, 3:26 p.m. UTC
pktio/tap.c:267:21: error: comparison between signed and
unsigned integer expressions [-Werror=sign-compare]
   } else if (retval != pkt_len) {

Cc: Ilya Maximets <i.maximets@samsung.com>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
---
 platform/linux-generic/pktio/tap.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Bill Fischofer Dec. 14, 2015, 3:31 p.m. UTC | #1
On Mon, Dec 14, 2015 at 9:26 AM, Maxim Uvarov <maxim.uvarov@linaro.org>
wrote:

> pktio/tap.c:267:21: error: comparison between signed and

> unsigned integer expressions [-Werror=sign-compare]

>    } else if (retval != pkt_len) {

>

> Cc: Ilya Maximets <i.maximets@samsung.com>

> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>

>


Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org>



> ---

>  platform/linux-generic/pktio/tap.c | 2 +-

>  1 file changed, 1 insertion(+), 1 deletion(-)

>

> diff --git a/platform/linux-generic/pktio/tap.c

> b/platform/linux-generic/pktio/tap.c

> index 7ecb300..99e15ce 100644

> --- a/platform/linux-generic/pktio/tap.c

> +++ b/platform/linux-generic/pktio/tap.c

> @@ -264,7 +264,7 @@ static int tap_pktio_send(pktio_entry_t *pktio_entry,

> odp_packet_t pkts[],

>                                 return -1;

>                         }

>                         break;

> -               } else if (retval != pkt_len) {

> +               } else if ((uint32_t)retval != pkt_len) {

>                         ODP_ERR("sent partial ethernet packet\n");

>                         if (i == 0) {

>                                 __odp_errno = EMSGSIZE;

> --

> 1.9.1

>

> _______________________________________________

> lng-odp mailing list

> lng-odp@lists.linaro.org

> https://lists.linaro.org/mailman/listinfo/lng-odp

>
Maxim Uvarov Dec. 14, 2015, 3:38 p.m. UTC | #2
Merged,
Maxim.

On 12/14/2015 18:31, Bill Fischofer wrote:
>
>
> On Mon, Dec 14, 2015 at 9:26 AM, Maxim Uvarov <maxim.uvarov@linaro.org 
> <mailto:maxim.uvarov@linaro.org>> wrote:
>
>     pktio/tap.c:267:21: error: comparison between signed and
>     unsigned integer expressions [-Werror=sign-compare]
>        } else if (retval != pkt_len) {
>
>     Cc: Ilya Maximets <i.maximets@samsung.com
>     <mailto:i.maximets@samsung.com>>
>     Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org
>     <mailto:maxim.uvarov@linaro.org>>
>
>
> Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org 
> <mailto:bill.fischofer@linaro.org>>
>
>     ---
>      platform/linux-generic/pktio/tap.c | 2 +-
>      1 file changed, 1 insertion(+), 1 deletion(-)
>
>     diff --git a/platform/linux-generic/pktio/tap.c
>     b/platform/linux-generic/pktio/tap.c
>     index 7ecb300..99e15ce 100644
>     --- a/platform/linux-generic/pktio/tap.c
>     +++ b/platform/linux-generic/pktio/tap.c
>     @@ -264,7 +264,7 @@ static int tap_pktio_send(pktio_entry_t
>     *pktio_entry, odp_packet_t pkts[],
>                                     return -1;
>                             }
>                             break;
>     -               } else if (retval != pkt_len) {
>     +               } else if ((uint32_t)retval != pkt_len) {
>                             ODP_ERR("sent partial ethernet packet\n");
>                             if (i == 0) {
>                                     __odp_errno = EMSGSIZE;
>     --
>     1.9.1
>
>     _______________________________________________
>     lng-odp mailing list
>     lng-odp@lists.linaro.org <mailto:lng-odp@lists.linaro.org>
>     https://lists.linaro.org/mailman/listinfo/lng-odp
>
>
diff mbox

Patch

diff --git a/platform/linux-generic/pktio/tap.c b/platform/linux-generic/pktio/tap.c
index 7ecb300..99e15ce 100644
--- a/platform/linux-generic/pktio/tap.c
+++ b/platform/linux-generic/pktio/tap.c
@@ -264,7 +264,7 @@  static int tap_pktio_send(pktio_entry_t *pktio_entry, odp_packet_t pkts[],
 				return -1;
 			}
 			break;
-		} else if (retval != pkt_len) {
+		} else if ((uint32_t)retval != pkt_len) {
 			ODP_ERR("sent partial ethernet packet\n");
 			if (i == 0) {
 				__odp_errno = EMSGSIZE;