All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kamil Rytarowski <n54@gmx.com>
To: shemminger@osdl.org, netdev@vger.kernel.org
Subject: iproute2 patch against GCC 4.8.0
Date: Fri, 03 May 2013 18:52:21 +0200	[thread overview]
Message-ID: <5183EB45.8040504@gmx.com> (raw)

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

Hello!

I'm attaching a patch [1] "Feed GCC 4.8.0 against new warning that is 
shipped with -Wall: -Wsizeof-pointer-memaccess.".

More details: http://gcc.gnu.org/gcc-4.8/porting_to.html

Regards,

[1] 0001-Feed-GCC-4.8.0-against-new-warning-that-is-shipped-w.patch

[-- Attachment #2: 0001-Feed-GCC-4.8.0-against-new-warning-that-is-shipped-w.patch --]
[-- Type: text/x-patch, Size: 757 bytes --]

>From 1f3ea01fe2ff61cbbca6474f7d9903a0756a4f44 Mon Sep 17 00:00:00 2001
From: Kamil Rytarowski <n54@gmx.com>
Date: Fri, 3 May 2013 18:43:38 +0200
Subject: [PATCH] Feed GCC 4.8.0 against new warning that is shipped with
 -Wall: -Wsizeof-pointer-memaccess.

---
 misc/lnstat.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/misc/lnstat.c b/misc/lnstat.c
index bd19cc1..90198b7 100644
--- a/misc/lnstat.c
+++ b/misc/lnstat.c
@@ -166,7 +166,7 @@ static struct table_hdr *build_hdr_string(struct lnstat_file *lnstat_files,
 
 	for (i = 0; i < HDR_LINES; i++) {
 		th.hdr[i] = malloc(HDR_LINE_LENGTH);
-		memset(th.hdr[i], 0, sizeof(th.hdr[i]));
+		memset(th.hdr[i], 0, HDR_LINE_LENGTH);
 	}
 
 	for (i = 0; i < fps->num; i++) {
-- 
1.8.1.5


                 reply	other threads:[~2013-05-03 16:49 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=5183EB45.8040504@gmx.com \
    --to=n54@gmx.com \
    --cc=netdev@vger.kernel.org \
    --cc=shemminger@osdl.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.