Skip to content

Commit

Permalink
m68k: fix unused variable warning in mempcy.c
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Greg Ungerer committed Dec 5, 2012
1 parent 3c46041 commit 423c01e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion arch/m68k/lib/memcpy.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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"
Expand Down

0 comments on commit 423c01e

Please sign in to comment.