Comments (15)
No - no warnings anymore (for both c and cpp) đ
from lv_drivers.
Compiling the master branch shows a lot of new warnings, mainly
I compile LittlevGL with many warnings enabled and I only get warnings from one file. What warnings are you using?
the cpp keyword "template" is used as function argument
Fixed here: 627b3d1
The lv_drv_conf_templ.h has 3 devices enabled per default
I'm not entirely sure why these are enabled out-of-the-box. The folder structure they're assuming appears to predate 6.0 so I'm guessing these haven't been updated in a while.
from lv_drivers.
Thanks for your feedback.
regarding the warnings:
I'm using this setting (and doesn't change it for v6 or v7)
# set compiler settings
set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -O3")
seems to be a cpp related issue (extern "C"
) in the lv_drv_conf.h header:
e.g. each function definition with arguments leads to an unused parameter warning.
regarding the default enabled devices:
This is strange indeed - I had no compile issues with the release/v6 branch.
Should be examined more closely ...
from lv_drivers.
Sorry, it's my fault. During merging branches I messed up something.
I reverted it, and now should work.
from lv_drivers.
Ok - jumping back will eliminate those issues ;-)
but I still get one warning type (warning: missing initializer for member
) from lv_color.h like
/home/pi/work/lora/Rfm96Raspberry/Application/lvgl/src/lv_hal/../lv_misc/lv_color.h: In function âvoid lv_color_mix_with_alpha(lv_color_t, lv_opa_
t, lv_color_t, lv_opa_t, lv_color_t*, lv_opa_t*)â:
/home/pi/work/lora/Rfm96Raspberry/Application/lvgl/src/lv_hal/../lv_misc/lv_color.h:536:47: warning: missing initializer for member âlv_color16_t:
:<unnamed struct>::greenâ [-Wmissing-field-initializers]
static lv_color_t fg_color_save = {{0}};
^
I'm not sure but I think those warnings were emitted also in the past ...
from lv_drivers.
Ok - jumping back will eliminate those issues ;-)
Great!
but I still get one warning type (warning: missing initializer for member) from lv_color.h like
That's strange why it complains only about green
as red
and blue
are just next to it. With GCC I don't get a warning for this.
from lv_drivers.
sorry my last comment may be misleading:
it's only one type of warning - of course there also warnings for the other colors red and blue
I'm using gcc with the additional compiler settings -Wall -Wextra
pi@raspi3b:~ $
> gcc --version
gcc (Raspbian 8.3.0-6+rpi1) 8.3.0
Copyright (C) 2018 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
from lv_drivers.
yep: -Wextra
contains -Wmissing-field-initializers
from lv_drivers.
Test run with these settings and it doesn't show warnings.
Could you send the whole build log and your lv_conf.h?
from lv_drivers.
You are right !
The warnings only occurs due my attempt to use lvgl in my class gui.cpp
and are thrown if this module is including lvgl headers, e.g.
[ 89%] Building CXX object CMakeFiles/rfm96_test.dir/gui.cpp.o
In file included from /home/pi/work/lora/Rfm96Raspberry/Application/lvgl/src/lv_hal/lv_hal_disp.h:21,
from /home/pi/work/lora/Rfm96Raspberry/Application/lvgl/src/lv_hal/lv_hal.h:16,
from /home/pi/work/lora/Rfm96Raspberry/Application/lvgl/lvgl.h:22,
from /home/pi/work/lora/Rfm96Raspberry/Application/lv_drivers/display/fbdev.h:29,
from /home/pi/work/lora/Rfm96Raspberry/Application/gui.h:12,
from /home/pi/work/lora/Rfm96Raspberry/Application/gui.cpp:8:
/home/pi/work/lora/Rfm96Raspberry/Application/lvgl/src/lv_hal/../lv_misc/lv_color.h: In function âvoid lv_color_mix_with_alpha(lv_color_t, lv_opa_
t, lv_color_t, lv_opa_t, lv_color_t*, lv_opa_t*)â:
/home/pi/work/lora/Rfm96Raspberry/Application/lvgl/src/lv_hal/../lv_misc/lv_color.h:536:47: warning: missing initializer for member âlv_color16_t:
:<unnamed struct>::greenâ [-Wmissing-field-initializers]
static lv_color_t fg_color_save = {{0}};
^
/home/pi/work/lora/Rfm96Raspberry/Application/lvgl/src/lv_hal/../lv_misc/lv_color.h:536:47: warning: missing initializer for member âlv_color16_t:
:<unnamed struct>::redâ [-Wmissing-field-initializers]
/home/pi/work/lora/Rfm96Raspberry/Application/lvgl/src/lv_hal/../lv_misc/lv_color.h:537:47: warning: missing initializer for member âlv_color16_t:
:<unnamed struct>::greenâ [-Wmissing-field-initializers]
static lv_color_t bg_color_save = {{0}};
^
/home/pi/work/lora/Rfm96Raspberry/Application/lvgl/src/lv_hal/../lv_misc/lv_color.h:537:47: warning: missing initializer for member âlv_color16_t:
:<unnamed struct>::redâ [-Wmissing-field-initializers]
/home/pi/work/lora/Rfm96Raspberry/Application/lvgl/src/lv_hal/../lv_misc/lv_color.h:538:49: warning: missing initializer for member âlv_color16_t:
:<unnamed struct>::greenâ [-Wmissing-field-initializers]
static lv_color_t res_color_saved = {{0}};
^
/home/pi/work/lora/Rfm96Raspberry/Application/lvgl/src/lv_hal/../lv_misc/lv_color.h:538:49: warning: missing initializer for member âlv_color16_t:
:<unnamed struct>::redâ [-Wmissing-field-initializers]
But in the end, due to the static c implementation of lvgl, I had to make so many "exceptions" in the class that it really doesn't make sense to force a cpp
class for this.
Reverting back the code to c
removes all warnings - so we can close this issue.
Thanks for your support !!
from lv_drivers.
We should still fix it, as C++ code should be able to include public headers without warnings.
from lv_drivers.
OK, fine !
Adding the missing parts (in my case green and blue because of LV_COLOR_DEPTH
= 16) will eliminate the warning
e.g. replacing line 536:
static lv_color_t fg_color_save = {{0}};
by this one:
static lv_color_t fg_color_save = { { 0, 0, 0 } };
But due to the different implementation possibilities (dependency on LV_COLOR_DEPTH
and others) a new init macro should be created ...
from lv_drivers.
I fixed it like this: 966b4b11
Do you still see the warning?
from lv_drivers.
Great! I guess we can close this issue then.
from lv_drivers.
Great! :)
from lv_drivers.
Related Issues (20)
- drm mode fails to draw on H616 processor HOT 3
- define SDL_MAIN_HANDLEDďź HOT 2
- Question about ILI9488 VS ILI9341 Driver HOT 1
- Fullscreen window mode in Wayland HOT 5
- SDL crashes under certain comditions in `8.3.0` HOT 3
- how to support(register) multiple input devices? HOT 2
- Add lvgl v9 support HOT 14
- Add FT81x support to display HOT 4
- Build of C++ user code fails when attempting to pass xpt2046_read as indev read_cb
- evdev reverse mapping is broken HOT 2
- Getting mmap fail EINV with RPi4 HOT 3
- listener function for opcode 3 of xdg_toplevel is NULL HOT 1
- [RK3568 waylay drivce] interface 'xdg_toplevel' has no event 3 HOT 8
- How to implement esp-idf LV_DRV_DISP_SPI_WR_ARRAY. HOT 3
- fbdev is broken against lvgl master/v9 HOT 3
- There is no lv_disp_drv_t data type in source code HOT 4
- Add SDL high DPI config
- LVGL 8.3+wayland can't find wayland shell HOT 20
- in windowsďźcmake is error HOT 9
- only have the lv_win32_init interface, how to de-init? HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
đ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. đđđ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google â¤ď¸ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lv_drivers.