glx: warning fixes

render2.c: In function ‘__glXDisp_Map2d’:
render2.c:127: warning: ‘u1’ may be used uninitialized in this function
render2.c: In function ‘__glXDisp_Map1d’:
render2.c:90: warning: ‘u1’ may be used uninitialized in this function

Remove unnecessary test, and change memcpy to memmove as all users were
doing overlapping copies.

Signed-off-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
This commit is contained in:
Adam Jackson 2010-10-19 11:59:23 -04:00 committed by Daniel Stone
parent d057e265c8
commit 63ccaec2c3
2 changed files with 2 additions and 2 deletions

View File

@ -47,7 +47,7 @@
** Fetch a double from potentially unaligned memory.
*/
#ifdef __GLX_ALIGN64
#define __GLX_MEM_COPY(dst,src,n) if (src != NULL && dst != NULL) memcpy(dst,src,n)
#define __GLX_MEM_COPY(dst,src,n) memmove(dst,src,n)
#define __GLX_GET_DOUBLE(dst,src) __GLX_MEM_COPY(&dst,src,8)
#else
#define __GLX_GET_DOUBLE(dst,src) (dst) = *((GLdouble*)(src))

View File

@ -43,7 +43,7 @@
** Fetch a double from potentially unaligned memory.
*/
#ifdef __GLX_ALIGN64
#define __GLX_MEM_COPY(dst,src,n) memcpy(dst,src,n)
#define __GLX_MEM_COPY(dst,src,n) memmove(dst,src,n)
#define __GLX_GET_DOUBLE(dst,src) __GLX_MEM_COPY(&dst,src,8)
#else
#define __GLX_GET_DOUBLE(dst,src) (dst) = *((GLdouble*)(src))