[prev in list] [next in list] [prev in thread] [next in thread]
List: uclinux-dev
Subject: [uClinux-dev] [PATCH] m68k: fix unused variable warning in mempcy.c
From: <gerg () snapgear ! com>
Date: 2012-10-29 6:20:40
Message-ID: 1351491640-19281-1-git-send-email-gerg () snapgear ! com
[Download RAW message or body]
From: Greg Ungerer <gerg@uclinux.org>
When compiling for original 68000 or ColdFire targets you will get the
following warning when compiling arch/m68k/lib/memcpy.c:
CC arch/m68k/lib/memcpy.o
arch/m68k/lib/memcpy.c: In function ‘__builtin_memcpy':
arch/m68k/lib/memcpy.c:13:15: warning: unused variable ‘temp1'
This is easily fixed by moving the definition of temp1 into the code block
where it is used.
Signed-off-by: Greg Ungerer <gerg@uclinux.org>
---
arch/m68k/lib/memcpy.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/arch/m68k/lib/memcpy.c b/arch/m68k/lib/memcpy.c
index 10ca051..c1e2dfb 100644
--- a/arch/m68k/lib/memcpy.c
+++ b/arch/m68k/lib/memcpy.c
@@ -10,7 +10,7 @@
void *memcpy(void *to, const void *from, size_t n)
{
void *xto = to;
- size_t temp, temp1;
+ size_t temp;
if (!n)
return xto;
@@ -47,6 +47,7 @@ void *memcpy(void *to, const void *from, size_t n)
for (; temp; temp--)
*lto++ = *lfrom++;
#else
+ size_t temp1;
asm volatile (
" movel %2,%3\n"
" andw #7,%3\n"
--
1.7.0.4
_______________________________________________
uClinux-dev mailing list
uClinux-dev@uclinux.org
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by uclinux-dev@uclinux.org
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic