All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jesper Dangaard Brouer <brouer@redhat.com>
To: lvs-devel@vger.kernel.org, Daniel Borkmann <dborkman@redhat.com>
Cc: Wensong Zhang <wensong@linux-vs.org>,
	Julian Anastasov <ja@ssi.bg>, Simon Horman <horms@verge.net.au>,
	Ryan O'Hara <rohara@redhat.com>,
	Jesper Dangaard Brouer <brouer@redhat.com>
Subject: [ipvsadm PATCH 1/2] ipvsadm: fix compile warning in print_largenum
Date: Thu, 04 Dec 2014 10:38:55 +0100	[thread overview]
Message-ID: <20141204093855.20470.31558.stgit@localhost> (raw)
In-Reply-To: <20141204093757.20470.92421.stgit@localhost>

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;

  reply	other threads:[~2014-12-04  9:38 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20141204093855.20470.31558.stgit@localhost \
    --to=brouer@redhat.com \
    --cc=dborkman@redhat.com \
    --cc=horms@verge.net.au \
    --cc=ja@ssi.bg \
    --cc=lvs-devel@vger.kernel.org \
    --cc=rohara@redhat.com \
    --cc=wensong@linux-vs.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.