All of lore.kernel.org
 help / color / mirror / Atom feed
* [ipvsadm PATCH 0/2] trivial compile warning fixes for ipvsadm
@ 2014-12-04  9:38 Jesper Dangaard Brouer
  2014-12-04  9:38 ` [ipvsadm PATCH 1/2] ipvsadm: fix compile warning in print_largenum Jesper Dangaard Brouer
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Jesper Dangaard Brouer @ 2014-12-04  9:38 UTC (permalink / raw)
  To: lvs-devel, Daniel Borkmann
  Cc: Wensong Zhang, Julian Anastasov, Simon Horman, Ryan O'Hara,
	Jesper Dangaard Brouer

Some trivial compile warning fixes from Daniel Borkmann to the ipvsadm tool.

I'll apply these to the git repo[1] if nobody objects.

[1] git://git.kernel.org/pub/scm/utils/kernel/ipvsadm/ipvsadm.git

---

Daniel Borkmann (2):
      ipvsadm: fix compile warning in print_largenum
      ipvsadm: fix compile warning in modprobe_ipvs


 ipvsadm.c |   10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

--
Best regards,
  Jesper Dangaard Brouer
  MSc.CS, Sr. Network Kernel Developer at Red Hat
  Author of http://www.iptv-analyzer.org
  LinkedIn: http://www.linkedin.com/in/brouer


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

* [ipvsadm PATCH 1/2] ipvsadm: fix compile warning in print_largenum
  2014-12-04  9:38 [ipvsadm PATCH 0/2] trivial compile warning fixes for ipvsadm Jesper Dangaard Brouer
@ 2014-12-04  9:38 ` Jesper Dangaard Brouer
  2014-12-04  9:39 ` [ipvsadm PATCH 2/2] ipvsadm: fix compile warning in modprobe_ipvs Jesper Dangaard Brouer
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: Jesper Dangaard Brouer @ 2014-12-04  9:38 UTC (permalink / raw)
  To: lvs-devel, Daniel Borkmann
  Cc: Wensong Zhang, Julian Anastasov, Simon Horman, Ryan O'Hara,
	Jesper Dangaard Brouer

From: Daniel Borkmann <dborkman@redhat.com>

ipvsadm.c: In function ‘print_largenum’:
ipvsadm.c:1445:3: warning: field width specifier ‘*’ expects argument of type ‘int’, but argument 2 has type ‘size_t’ [-Wformat=]
   printf("%*llu", len <= 8 ? 9 : len + 1, i);
   ^

Fix by reducing the scope and use int for len instead.

Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com>
---
 ipvsadm.c |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/ipvsadm.c b/ipvsadm.c
index 1190839..8931412 100644
--- a/ipvsadm.c
+++ b/ipvsadm.c
@@ -1437,15 +1437,15 @@ static inline char *fwd_switch(unsigned flags)
 
 static void print_largenum(unsigned long long i, unsigned int format)
 {
-	char mytmp[32];
-	size_t len;

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

* [ipvsadm PATCH 2/2] ipvsadm: fix compile warning in modprobe_ipvs
  2014-12-04  9:38 [ipvsadm PATCH 0/2] trivial compile warning fixes for ipvsadm Jesper Dangaard Brouer
  2014-12-04  9:38 ` [ipvsadm PATCH 1/2] ipvsadm: fix compile warning in print_largenum Jesper Dangaard Brouer
@ 2014-12-04  9:39 ` Jesper Dangaard Brouer
  2014-12-04 12:23 ` [ipvsadm PATCH 0/2] trivial compile warning fixes for ipvsadm Simon Horman
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: Jesper Dangaard Brouer @ 2014-12-04  9:39 UTC (permalink / raw)
  To: lvs-devel, Daniel Borkmann
  Cc: Wensong Zhang, Julian Anastasov, Simon Horman, Ryan O'Hara,
	Jesper Dangaard Brouer

From: Daniel Borkmann <dborkman@redhat.com>

ipvsadm.c: In function ‘modprobe_ipvs’:
ipvsadm.c:1249:6: warning: variable ‘rc’ set but not used [-Wunused-but-set-variable]
  int rc;
      ^
Address this by also checking if waitpid(2) returned successfully
before we check actual status information.

Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com>
---
 ipvsadm.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ipvsadm.c b/ipvsadm.c
index 8931412..72ddc8a 100644
--- a/ipvsadm.c
+++ b/ipvsadm.c
@@ -1255,7 +1255,7 @@ static int modprobe_ipvs(void)
 
 	rc = waitpid(child, &status, 0);
 
-	if (!WIFEXITED(status) || WEXITSTATUS(status)) {
+	if (rc == -1 || !WIFEXITED(status) || WEXITSTATUS(status)) {
 		return 1;
 	}
 


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

* Re: [ipvsadm PATCH 0/2] trivial compile warning fixes for ipvsadm
  2014-12-04  9:38 [ipvsadm PATCH 0/2] trivial compile warning fixes for ipvsadm Jesper Dangaard Brouer
  2014-12-04  9:38 ` [ipvsadm PATCH 1/2] ipvsadm: fix compile warning in print_largenum Jesper Dangaard Brouer
  2014-12-04  9:39 ` [ipvsadm PATCH 2/2] ipvsadm: fix compile warning in modprobe_ipvs Jesper Dangaard Brouer
@ 2014-12-04 12:23 ` Simon Horman
  2014-12-07 18:30 ` Julian Anastasov
  2014-12-09  9:55 ` Jesper Dangaard Brouer
  4 siblings, 0 replies; 6+ messages in thread
From: Simon Horman @ 2014-12-04 12:23 UTC (permalink / raw)
  To: Jesper Dangaard Brouer
  Cc: lvs-devel, Daniel Borkmann, Wensong Zhang, Julian Anastasov,
	Ryan O'Hara

On Thu, Dec 04, 2014 at 10:38:50AM +0100, Jesper Dangaard Brouer wrote:
> Some trivial compile warning fixes from Daniel Borkmann to the ipvsadm tool.
> 
> I'll apply these to the git repo[1] if nobody objects.
> 
> [1] git://git.kernel.org/pub/scm/utils/kernel/ipvsadm/ipvsadm.git

Acked-by: Simon Horman <horms@verge.net.au>

> 
> ---
> 
> Daniel Borkmann (2):
>       ipvsadm: fix compile warning in print_largenum
>       ipvsadm: fix compile warning in modprobe_ipvs
> 
> 
>  ipvsadm.c |   10 +++++-----
>  1 file changed, 5 insertions(+), 5 deletions(-)
> 
> --
> Best regards,
>   Jesper Dangaard Brouer
>   MSc.CS, Sr. Network Kernel Developer at Red Hat
>   Author of http://www.iptv-analyzer.org
>   LinkedIn: http://www.linkedin.com/in/brouer
> 
> --
> To unsubscribe from this list: send the line "unsubscribe lvs-devel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 

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

* Re: [ipvsadm PATCH 0/2] trivial compile warning fixes for ipvsadm
  2014-12-04  9:38 [ipvsadm PATCH 0/2] trivial compile warning fixes for ipvsadm Jesper Dangaard Brouer
                   ` (2 preceding siblings ...)
  2014-12-04 12:23 ` [ipvsadm PATCH 0/2] trivial compile warning fixes for ipvsadm Simon Horman
@ 2014-12-07 18:30 ` Julian Anastasov
  2014-12-09  9:55 ` Jesper Dangaard Brouer
  4 siblings, 0 replies; 6+ messages in thread
From: Julian Anastasov @ 2014-12-07 18:30 UTC (permalink / raw)
  To: Jesper Dangaard Brouer
  Cc: lvs-devel, Daniel Borkmann, Wensong Zhang, Simon Horman,
	Ryan O'Hara


	Hello,

On Thu, 4 Dec 2014, Jesper Dangaard Brouer wrote:

> Some trivial compile warning fixes from Daniel Borkmann to the ipvsadm tool.
> 
> I'll apply these to the git repo[1] if nobody objects.
> 
> [1] git://git.kernel.org/pub/scm/utils/kernel/ipvsadm/ipvsadm.git
> 
> ---
> 
> Daniel Borkmann (2):
>       ipvsadm: fix compile warning in print_largenum
>       ipvsadm: fix compile warning in modprobe_ipvs

	Both patches look ok to me too,

Acked-by: Julian Anastasov <ja@ssi.bg>

	We should not see ECHILD when SIGCHLD=SIG_DFL, right?
Only for SIG_IGN.

Regards

--
Julian Anastasov <ja@ssi.bg>

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

* Re: [ipvsadm PATCH 0/2] trivial compile warning fixes for ipvsadm
  2014-12-04  9:38 [ipvsadm PATCH 0/2] trivial compile warning fixes for ipvsadm Jesper Dangaard Brouer
                   ` (3 preceding siblings ...)
  2014-12-07 18:30 ` Julian Anastasov
@ 2014-12-09  9:55 ` Jesper Dangaard Brouer
  4 siblings, 0 replies; 6+ messages in thread
From: Jesper Dangaard Brouer @ 2014-12-09  9:55 UTC (permalink / raw)
  To: lvs-devel, Daniel Borkmann
  Cc: Wensong Zhang, Julian Anastasov, Simon Horman, Ryan O'Hara,
	brouer

On Thu, 04 Dec 2014 10:38:50 +0100
Jesper Dangaard Brouer <brouer@redhat.com> wrote:

> Some trivial compile warning fixes from Daniel Borkmann to the ipvsadm tool.
> 
> I'll apply these to the git repo[1] if nobody objects.

FYI: done, pushed to git tree (with Simon and Julian's ACKs):
 [1] git://git.kernel.org/pub/scm/utils/kernel/ipvsadm/ipvsadm.git

-- 
Best regards,
  Jesper Dangaard Brouer
  MSc.CS, Sr. Network Kernel Developer at Red Hat
  Author of http://www.iptv-analyzer.org
  LinkedIn: http://www.linkedin.com/in/brouer

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

end of thread, other threads:[~2014-12-09  9:55 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-12-04  9:38 [ipvsadm PATCH 0/2] trivial compile warning fixes for ipvsadm Jesper Dangaard Brouer
2014-12-04  9:38 ` [ipvsadm PATCH 1/2] ipvsadm: fix compile warning in print_largenum Jesper Dangaard Brouer
2014-12-04  9:39 ` [ipvsadm PATCH 2/2] ipvsadm: fix compile warning in modprobe_ipvs Jesper Dangaard Brouer
2014-12-04 12:23 ` [ipvsadm PATCH 0/2] trivial compile warning fixes for ipvsadm Simon Horman
2014-12-07 18:30 ` Julian Anastasov
2014-12-09  9:55 ` Jesper Dangaard Brouer

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.