[PATCH:xf86-video-mga] Fix pointer cast warning.

Alan Coopersmith alan.coopersmith at oracle.com
Mon Feb 23 22:55:51 PST 2015


On 02/23/15 10:36 PM, Mark Kettenis wrote:
>>   cast to pointer from integer of different size
>>   [-Werror=int-to-pointer-cast]
>>
>>   Signed-off-by: Thomas Klausner <wiz at NetBSD.org>
>>   ---
>>    src/mga_exa.c | 2 +-
>>    1 file changed, 1 insertion(+), 1 deletion(-)
>
> This code makes no sense to me.  exaGetPixmapFirstPixel() returns a pixel
> value.  Interpreting that as a pointer to the first pixel must be wrong.
>
> Note that the actual usage of mgaDownloadFromScreen() is #if 0'ed out.

Perhaps in your copy, but not upstream:

http://cgit.freedesktop.org/xorg/driver/xf86-video-mga/tree/src/mga_exa.c#n896

-- 
	-Alan Coopersmith-              alan.coopersmith at oracle.com
	 Oracle Solaris Engineering - http://blogs.oracle.com/alanc


More information about the xorg-devel mailing list