Skip to content

Commit

Permalink
parisc: avoid unitialized variable warning in pa_memcpy()
Browse files Browse the repository at this point in the history
Avoid this warning, while still prevent gcc from optimizing away the exception code:
arch/parisc/lib/memcpy.c: In function ‘pa_memcpy’:
arch/parisc/lib/memcpy.c:256:2: warning: ‘dummy’ may be used uninitialized in this function [-Wuninitialized]

Signed-off-by: Helge Deller <deller@gmx.de>
  • Loading branch information
Helge Deller committed Mar 2, 2013
1 parent 850df98 commit d8d0524
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/parisc/lib/memcpy.c
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
DECLARE_PER_CPU(struct exception_data, exception_data);

#define preserve_branch(label) do { \
volatile int dummy; \
volatile int dummy = 0; \
/* The following branch is never taken, it's just here to */ \
/* prevent gcc from optimizing away our exception code. */ \
if (unlikely(dummy != dummy)) \
Expand Down

0 comments on commit d8d0524

Please sign in to comment.