Skip to content

Commit

Permalink
Silence warning about comparing signed and unsigned
Browse files Browse the repository at this point in the history
qxcbimage.cpp:72:26: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]

Task-number: QTBUG-69923
Change-Id: Icdb4ce8cb7ce5b48d7ee3839166eb1c7c9520c78
Reviewed-by: Thiago Macieira <[email protected]>
  • Loading branch information
ec1oud committed Aug 14, 2018
1 parent 8dd40e9 commit 8f18510
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/plugins/platforms/xcb/qxcbimage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ QImage::Format imageFormatForMasks(int depth, int bits_per_pixel, int red_mask,
if (red_mask == 0xff && blue_mask == 0xff0000)
return QImage::Format_RGBA8888_Premultiplied;
#else
if (red_mask == 0xff000000 && blue_mask == 0xff00)
if (unsigned(red_mask) == unsigned(0xff000000) && blue_mask == 0xff00)
return QImage::Format_RGBA8888_Premultiplied;
#endif
if (red_mask == 0x3ff && blue_mask == 0x3ff00000)
Expand All @@ -90,7 +90,7 @@ QImage::Format imageFormatForMasks(int depth, int bits_per_pixel, int red_mask,
if (red_mask == 0xff && blue_mask == 0xff0000)
return QImage::Format_RGBX8888;
#else
if (red_mask == 0xff000000 && blue_mask == 0xff00)
if (unsigned(red_mask) == unsigned(0xff000000) && blue_mask == 0xff00)
return QImage::Format_RGBX8888;
#endif
break;
Expand Down

0 comments on commit 8f18510

Please sign in to comment.