From a6ffabda67a703f6ba7091db9ad8eed623bc4347 Mon Sep 17 00:00:00 2001 From: Mike Gabriel Date: Fri, 17 Feb 2017 13:35:48 +0000 Subject: glx: warning fixes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit commit 63ccaec2c39f4b5742383472c951ee2cd35c9e14 Author: Adam Jackson Date: Tue Oct 19 11:59:23 2010 -0400 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 Reviewed-by: Daniel Stone Backported-to-NX-by: Mike Gabriel --- nx-X11/programs/Xserver/GL/glx/unpack.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nx-X11/programs/Xserver/GL/glx/unpack.h b/nx-X11/programs/Xserver/GL/glx/unpack.h index 7d84ff575..9554ba4b9 100644 --- a/nx-X11/programs/Xserver/GL/glx/unpack.h +++ b/nx-X11/programs/Xserver/GL/glx/unpack.h @@ -52,7 +52,7 @@ ** Fetch a double from potentially unaligned memory. */ #ifdef __GLX_ALIGN64 -#define __GLX_MEM_COPY(dst,src,n) if (src && dst) 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)) -- cgit v1.2.3