summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Huddleston <jeremyhu@apple.com>2011-04-23 20:55:53 -0700
committerJeremy Huddleston <jeremyhu@apple.com>2011-04-25 18:25:27 -0700
commit5c9eafc8e5f8575c06591d244c2cb5ea07691cb4 (patch)
tree4550a840b4ed6fc622f90279c66eff16d2c09805
parentc524f8bb768f886d413839bc22184098394c2559 (diff)
render: Silence warnings when building with clang
picture.c:351:37: error: implicit conversion from 'unsigned int' to 'CARD16' (aka 'unsigned short') changes value from 4294967295 to 65535 [-Werror,-Wconstant-conversion] pFormats[f].direct.alphaMask = Mask(PICT_FORMAT_A(format)); ^~~~~~~~~~~~~~~~~~~~~~~~~~~ ... fatal error: too many errors emitted, stopping now [-ferror-limit=] Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> Suggested-by: Jamey Sharp <jamey@minilop.net> Reviewed-by: Jamey Sharp <jamey@minilop.net>
-rw-r--r--render/picture.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/render/picture.c b/render/picture.c
index e7e1f2b41..1877bfca1 100644
--- a/render/picture.c
+++ b/render/picture.c
@@ -158,7 +158,7 @@ addFormat (FormatInitRec formats[256],
return ++nformat;
}
-#define Mask(n) ((n) == 32 ? 0xffffffff : ((1 << (n))-1))
+#define Mask(n) ((1 << (n)) - 1)
PictFormatPtr
PictureCreateDefaultFormats (ScreenPtr pScreen, int *nformatp)