[PATCH 8/9] glx: warning fixes

Keith Packard keithp at keithp.com
Tue Oct 19 09:25:21 PDT 2010


On Tue, 19 Oct 2010 11:59:23 -0400, Adam Jackson <ajax at redhat.com> wrote:
> 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

> -#define __GLX_MEM_COPY(dst,src,n)	if (src != NULL && dst != NULL) memcpy(dst,src,n)
> +#define __GLX_MEM_COPY(dst,src,n)	memcpy(dst,src,n)

Looks like this actually needs to be a call to memmove instead -- every
use of this macro appears to have overlapped arguments. Seems like just
directly calling memmove would be cleaner anyway.

-- 
keith.packard at intel.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.x.org/archives/xorg-devel/attachments/20101019/c2c544d3/attachment.pgp>


More information about the xorg-devel mailing list