Commit 5c9eafc8 authored by Jeremy Huddleston's avatar Jeremy Huddleston

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: default avatarJeremy Huddleston <jeremyhu@apple.com>
Suggested-by: default avatarJamey Sharp <jamey@minilop.net>
Reviewed-by: default avatarJamey Sharp <jamey@minilop.net>
parent c524f8bb
......@@ -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)
......
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