diff options
author | Daniel Stone <daniel@fooishbar.org> | 2010-12-23 13:33:00 +0000 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2010-12-27 09:44:07 -0800 |
commit | efcb63d0ce43f96d0ac02b6f4a480dfd2374fc84 (patch) | |
tree | 8ef3c783f1d7e6b30f7278ff9aa387c252e2de0a | |
parent | 469d5bf8b75038631c27edbb0f9cdf7d737fa233 (diff) |
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 <daniel@fooishbar.org>
Reviewed-by: Tiago Vignatti <tiago.vignatti@nokia.com>
-rw-r--r-- | render/render.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/render/render.c b/render/render.c index 0bbbae899..702955818 100644 --- a/render/render.c +++ b/render/render.c @@ -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; } |