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:
parent
d057e265c8
commit
63ccaec2c3
|
@ -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))
|
||||
|
|
Loading…
Reference in New Issue
Block a user