All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH inarp 0/3] Invalid signed and unsigned comparison in netlink_recv.
@ 2016-06-06 20:20 OpenBMC Patches
  2016-06-06 20:20 ` [PATCH inarp 1/3] Makefile: Do not override CC OpenBMC Patches
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: OpenBMC Patches @ 2016-06-06 20:20 UTC (permalink / raw)
  To: openbmc



<!-- Reviewable:start -->
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/openbmc/inarp/4)
<!-- Reviewable:end -->


https://github.com/openbmc/inarp/pull/4

Patrick Williams (3):
  Makefile: Do not override CC.
  Makefile: Append instead of overwrite CFLAGS.
  Avoid signed and unsigned comparison

 Makefile | 4 ++--
 inarp.c  | 4 +++-
 2 files changed, 5 insertions(+), 3 deletions(-)

-- 
2.8.3

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH inarp 1/3] Makefile: Do not override CC.
  2016-06-06 20:20 [PATCH inarp 0/3] Invalid signed and unsigned comparison in netlink_recv OpenBMC Patches
@ 2016-06-06 20:20 ` OpenBMC Patches
  2016-06-06 20:20 ` [PATCH inarp 2/3] Makefile: Append instead of overwrite CFLAGS OpenBMC Patches
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: OpenBMC Patches @ 2016-06-06 20:20 UTC (permalink / raw)
  To: openbmc; +Cc: Patrick Williams

From: Patrick Williams <patrick@stwcx.xyz>

The makefile currently forces CC = gcc, which prevents building against
a Yocto SDK.

Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
---
 Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Makefile b/Makefile
index ebf69f3..0755653 100644
--- a/Makefile
+++ b/Makefile
@@ -1,5 +1,5 @@
 
-CC = gcc
+CC ?= gcc
 CFLAGS = -Wall -Wextra -Werror
 INSTALL = install
 prefix = /usr/local
-- 
2.8.3

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH inarp 2/3] Makefile: Append instead of overwrite CFLAGS.
  2016-06-06 20:20 [PATCH inarp 0/3] Invalid signed and unsigned comparison in netlink_recv OpenBMC Patches
  2016-06-06 20:20 ` [PATCH inarp 1/3] Makefile: Do not override CC OpenBMC Patches
@ 2016-06-06 20:20 ` OpenBMC Patches
  2016-06-06 20:20 ` [PATCH inarp 3/3] Avoid signed and unsigned comparison OpenBMC Patches
  2016-06-16 18:52 ` [PATCH inarp 0/3] Invalid signed and unsigned comparison in netlink_recv Patrick Williams
  3 siblings, 0 replies; 5+ messages in thread
From: OpenBMC Patches @ 2016-06-06 20:20 UTC (permalink / raw)
  To: openbmc; +Cc: Patrick Williams

From: Patrick Williams <patrick@stwcx.xyz>

Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
---
 Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Makefile b/Makefile
index 0755653..93f4a7d 100644
--- a/Makefile
+++ b/Makefile
@@ -1,6 +1,6 @@
 
 CC ?= gcc
-CFLAGS = -Wall -Wextra -Werror
+CFLAGS += -Wall -Wextra -Werror
 INSTALL = install
 prefix = /usr/local
 sbindir = ${prefix}/sbin
-- 
2.8.3

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH inarp 3/3] Avoid signed and unsigned comparison
  2016-06-06 20:20 [PATCH inarp 0/3] Invalid signed and unsigned comparison in netlink_recv OpenBMC Patches
  2016-06-06 20:20 ` [PATCH inarp 1/3] Makefile: Do not override CC OpenBMC Patches
  2016-06-06 20:20 ` [PATCH inarp 2/3] Makefile: Append instead of overwrite CFLAGS OpenBMC Patches
@ 2016-06-06 20:20 ` OpenBMC Patches
  2016-06-16 18:52 ` [PATCH inarp 0/3] Invalid signed and unsigned comparison in netlink_recv Patrick Williams
  3 siblings, 0 replies; 5+ messages in thread
From: OpenBMC Patches @ 2016-06-06 20:20 UTC (permalink / raw)
  To: openbmc; +Cc: Patrick Williams

From: Patrick Williams <patrick@stwcx.xyz>

The 'NLMSG_OK' macro use a _u32 struct entry for comparison but
the length from recv is signed.  Passing the signed type directly
into the macro causes a signed and unsigned comparison warning.

Fixes openbmc/inarp#3.

Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
---
 inarp.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/inarp.c b/inarp.c
index 08a0c30..4b4f03e 100644
--- a/inarp.c
+++ b/inarp.c
@@ -360,7 +360,9 @@ static void netlink_recv(struct inarp_ctx *inarp)
 		return;
 	}
 
-	for_each_nlmsg(buf, nlmsg, len)
+	size_t len_unsigned = (size_t)len;
+
+	for_each_nlmsg(buf, nlmsg, len_unsigned)
 		netlink_nlmsg(inarp, nlmsg);
 }
 
-- 
2.8.3

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH inarp 0/3] Invalid signed and unsigned comparison in netlink_recv.
  2016-06-06 20:20 [PATCH inarp 0/3] Invalid signed and unsigned comparison in netlink_recv OpenBMC Patches
                   ` (2 preceding siblings ...)
  2016-06-06 20:20 ` [PATCH inarp 3/3] Avoid signed and unsigned comparison OpenBMC Patches
@ 2016-06-16 18:52 ` Patrick Williams
  3 siblings, 0 replies; 5+ messages in thread
From: Patrick Williams @ 2016-06-16 18:52 UTC (permalink / raw)
  To: OpenBMC Patches; +Cc: openbmc, Jeremy Kerr

[-- Attachment #1: Type: text/plain, Size: 857 bytes --]

Jeremy,

We are ready for this to be merged.

On Mon, Jun 06, 2016 at 03:20:10PM -0500, OpenBMC Patches wrote:
> 
> 
> <!-- Reviewable:start -->
> This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/openbmc/inarp/4)
> <!-- Reviewable:end -->
> 
> 
> https://github.com/openbmc/inarp/pull/4
> 
> Patrick Williams (3):
>   Makefile: Do not override CC.
>   Makefile: Append instead of overwrite CFLAGS.
>   Avoid signed and unsigned comparison
> 
>  Makefile | 4 ++--
>  inarp.c  | 4 +++-
>  2 files changed, 5 insertions(+), 3 deletions(-)
> 
> -- 
> 2.8.3
> 
> 
> _______________________________________________
> openbmc mailing list
> openbmc@lists.ozlabs.org
> https://lists.ozlabs.org/listinfo/openbmc

-- 
Patrick Williams

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2016-06-16 18:52 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-06-06 20:20 [PATCH inarp 0/3] Invalid signed and unsigned comparison in netlink_recv OpenBMC Patches
2016-06-06 20:20 ` [PATCH inarp 1/3] Makefile: Do not override CC OpenBMC Patches
2016-06-06 20:20 ` [PATCH inarp 2/3] Makefile: Append instead of overwrite CFLAGS OpenBMC Patches
2016-06-06 20:20 ` [PATCH inarp 3/3] Avoid signed and unsigned comparison OpenBMC Patches
2016-06-16 18:52 ` [PATCH inarp 0/3] Invalid signed and unsigned comparison in netlink_recv Patrick Williams

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.