Commit 63ccaec2 authored by Adam Jackson's avatar Adam Jackson 🎧 Committed by Daniel Stone
Browse files

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's avatarAdam Jackson <ajax@redhat.com>
Reviewed-by: Daniel Stone's avatarDaniel Stone <daniel@fooishbar.org>
parent d057e265
......@@ -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))
......
......@@ -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))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment