Commit efcb63d0 authored by Daniel Stone's avatar Daniel Stone Committed by Keith Packard
Browse files

Render: Fix 'comparing between distinct pointer types' warning



Add the appropriate casts so that gcc shuts up, even if it doesn't
matter.
Signed-off-by: Daniel Stone's avatarDaniel Stone <daniel@fooishbar.org>
Reviewed-by: default avatarTiago Vignatti <tiago.vignatti@nokia.com>
parent 469d5bf8
......@@ -1084,8 +1084,10 @@ ProcRenderAddGlyphs (ClientPtr client)
remain -= (sizeof (CARD32) + sizeof (xGlyphInfo)) * nglyphs;
/* protect against bad nglyphs */
if (gi < stuff || gi > ((CARD32 *)stuff + client->req_len) ||
bits < stuff || bits > ((CARD32 *)stuff + client->req_len)) {
if (gi < ((xGlyphInfo *)stuff) ||
gi > ((xGlyphInfo *)((CARD32 *)stuff + client->req_len)) ||
bits < ((CARD8 *)stuff) ||
bits > ((CARD8 *)((CARD32 *)stuff + client->req_len))) {
err = BadLength;
goto bail;
}
......
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