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>
This commit is contained in:
parent
8cf0148380
commit
37deb317c5
1 changed files with 1 additions and 1 deletions
|
|
@ -44,7 +44,7 @@ int main(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
display_get_capabilities(display_dev, &display_caps);
|
display_get_capabilities(display_dev, &display_caps);
|
||||||
if (!(display_caps.supported_pixel_formats | PIXEL_FORMAT_ARGB_8888)) {
|
if (!(display_caps.supported_pixel_formats & PIXEL_FORMAT_ARGB_8888)) {
|
||||||
LOG_ERR("Display does not support ARGB8888 mode");
|
LOG_ERR("Display does not support ARGB8888 mode");
|
||||||
return -ENOTSUP;
|
return -ENOTSUP;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue