All of lore.kernel.org
 help / color / mirror / Atom feed
From: Helge Deller <deller@gmx.de>
To: linux-parisc@vger.kernel.org,
	James Bottomley <James.Bottomley@HansenPartnership.com>
Subject: parisc: avoid unitialized variable warning in pa_memcpy()
Date: Wed, 27 Feb 2013 23:21:15 +0100	[thread overview]
Message-ID: <20130227222115.GA2921@p100.box> (raw)
In-Reply-To: <20130227221137.GA2806@p100.box>

commit eed0220c5b2f33e4da2e9ba207c798c1bdebe500
Author: Helge Deller <deller@gmx.de>
Date:   Wed Feb 27 00:06:48 2013 +0100

parisc: avoid unitialized variable warning in pa_memcpy()

Avoid this warning, while still prevent gcc from optimizing away the ex=
ception code:
arch/parisc/lib/memcpy.c: In function =E2=80=98pa_memcpy=E2=80=99:
arch/parisc/lib/memcpy.c:256:2: warning: =E2=80=98dummy=E2=80=99 may be=
 used uninitialized in this function [-Wuninitialized]

Signed-off-by: Helge Deller <deller@gmx.de>

diff --git a/arch/parisc/lib/memcpy.c b/arch/parisc/lib/memcpy.c
index 1dbca5c..a49cc81 100644
--- a/arch/parisc/lib/memcpy.c
+++ b/arch/parisc/lib/memcpy.c
@@ -68,7 +68,7 @@
 DECLARE_PER_CPU(struct exception_data, exception_data);
=20
 #define preserve_branch(label)	do {					\
-	volatile int dummy;						\
+	volatile int dummy =3D 0;						\
 	/* The following branch is never taken, it's just here to  */	\
 	/* prevent gcc from optimizing away our exception code. */ 	\
 	if (unlikely(dummy !=3D dummy))					\
--
To unsubscribe from this list: send the line "unsubscribe linux-parisc"=
 in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  parent reply	other threads:[~2013-02-27 22:21 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-27 22:11 upcoming patches for 3.9 Helge Deller
2013-02-27 22:13 ` parisc: select ARCH_WANT_FRAME_POINTERS Helge Deller
2013-02-27 22:15 ` parisc: fix compile warnings triggered by atomic_sub(sizeof(),v) Helge Deller
2013-02-27 23:09   ` Rolf Eike Beer
2013-02-27 23:41     ` Helge Deller
2013-02-27 22:17 ` parisc: switch to compat_functions of io_setup, io_getevents and io_submit Helge Deller
2013-02-27 22:19 ` parisc: remove unused variable 'compat_val' Helge Deller
2013-02-27 22:21 ` Helge Deller [this message]
2013-02-27 22:22 ` parisc: check return value of down_interruptible() in hp_sdc_rtc.c Helge Deller
2013-03-02 19:40 ` parisc: fix redefinition of SET_PERSONALITY Helge Deller

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=20130227222115.GA2921@p100.box \
    --to=deller@gmx.de \
    --cc=James.Bottomley@HansenPartnership.com \
    --cc=linux-parisc@vger.kernel.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.