Skip to content

Commit 37deb31

Browse files
thugheskartben
authored andcommitted
samples: modules: lvgl: transparency: Fix supported pixel format check
Found while building with clang and -Wtautological-compare: samples/modules/lvgl/screen_transparency/src/main.c:47:45: error: bitwise or with non-zero value always evaluates to true [-Werror,-Wtautological-bitwise-compare] if (!(display_caps.supported_pixel_formats | PIXEL_FORMAT_ARGB_8888)) { ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~ Signed-off-by: Tom Hughes <tomhughes@chromium.org>
1 parent 8cf0148 commit 37deb31

File tree

1 file changed

+1
-1
lines changed
  • samples/modules/lvgl/screen_transparency/src

1 file changed

+1
-1
lines changed

samples/modules/lvgl/screen_transparency/src/main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ int main(void)
4444
}
4545

4646
display_get_capabilities(display_dev, &display_caps);
47-
if (!(display_caps.supported_pixel_formats | PIXEL_FORMAT_ARGB_8888)) {
47+
if (!(display_caps.supported_pixel_formats & PIXEL_FORMAT_ARGB_8888)) {
4848
LOG_ERR("Display does not support ARGB8888 mode");
4949
return -ENOTSUP;
5050
}

0 commit comments

Comments
 (0)