From b8d79037bfbfe0c9e51c339ea039e488d3956a23 Mon Sep 17 00:00:00 2001 From: Johannes Marbach Date: Wed, 22 Sep 2021 20:54:46 +0200 Subject: [PATCH] Update squeek2lvgl and fix further warnings Relates to #18 --- main.c | 3 +-- meson.build | 9 ++++---- sq2lv_layouts.c | 60 +++++++++++++------------------------------------ squeek2lvgl | 2 +- 4 files changed, 21 insertions(+), 53 deletions(-) diff --git a/main.c b/main.c index f3bb9d3..d02553c 100644 --- a/main.c +++ b/main.c @@ -408,7 +408,6 @@ int main(void) { #define MAX_TOUCHSCREENS 1 char *touchscreens[MAX_TOUCHSCREENS] = { NULL }; lv_indev_drv_t touchscreen_indev_drvs[MAX_TOUCHSCREENS]; - lv_indev_t *touchscreen_indevs[MAX_TOUCHSCREENS] = { NULL }; size_t num_touchscreens = libinput_find_devs(LIBINPUT_CAPABILITY_TOUCH, touchscreens, MAX_TOUCHSCREENS, false); for (int i = 0; i < num_touchscreens; ++i) { printf("found touchscreen %s\n", touchscreens[i]); @@ -418,7 +417,7 @@ int main(void) { touchscreen_indev_drvs[i].long_press_repeat_time = USHRT_MAX; libinput_multi_init_driver(&touchscreen_indev_drvs[i]); libinput_multi_set_file(&touchscreen_indev_drvs[i], touchscreens[i]); - touchscreen_indevs[i] = lv_indev_drv_register(&touchscreen_indev_drvs[i]); + lv_indev_drv_register(&touchscreen_indev_drvs[i]); } /* Initialise theme and styles */ diff --git a/meson.build b/meson.build index ec39be8..7d609fa 100644 --- a/meson.build +++ b/meson.build @@ -19,9 +19,9 @@ project( 'unl0kr', 'c', - version : '0.0', - default_options : ['warning_level=0'], - meson_version : '>=0.53.0', + version : '0.0.0', + default_options : 'warning_level=1', + meson_version : '>=0.53.0' ) unl0kr_sources = [ @@ -175,6 +175,5 @@ executable( dependencies : [ dependency('xkbcommon'), dependency('libinput'), - ], - c_args : ['-Wno-error=pedantic'] + ] ) diff --git a/sq2lv_layouts.c b/sq2lv_layouts.c index 1039cb1..223dc35 100644 --- a/sq2lv_layouts.c +++ b/sq2lv_layouts.c @@ -33,9 +33,7 @@ static const lv_btnmatrix_ctrl_t attributes_lower_us[] = { \ static const int num_modifiers_lower_us = 0; -static const int modifier_idxs_lower_us[] = { \ - \ -}; +static const int * const modifier_idxs_lower_us = NULL; static const int num_switchers_lower_us = 2; @@ -67,9 +65,7 @@ static const lv_btnmatrix_ctrl_t attributes_upper_us[] = { \ static const int num_modifiers_upper_us = 0; -static const int modifier_idxs_upper_us[] = { \ - \ -}; +static const int * const modifier_idxs_upper_us = NULL; static const int num_switchers_upper_us = 2; @@ -101,9 +97,7 @@ static const lv_btnmatrix_ctrl_t attributes_numbers_us[] = { \ static const int num_modifiers_numbers_us = 0; -static const int modifier_idxs_numbers_us[] = { \ - \ -}; +static const int * const modifier_idxs_numbers_us = NULL; static const int num_switchers_numbers_us = 1; @@ -179,9 +173,7 @@ static const lv_btnmatrix_ctrl_t attributes_lower_de[] = { \ static const int num_modifiers_lower_de = 0; -static const int modifier_idxs_lower_de[] = { \ - \ -}; +static const int * const modifier_idxs_lower_de = NULL; static const int num_switchers_lower_de = 3; @@ -213,9 +205,7 @@ static const lv_btnmatrix_ctrl_t attributes_upper_de[] = { \ static const int num_modifiers_upper_de = 0; -static const int modifier_idxs_upper_de[] = { \ - \ -}; +static const int * const modifier_idxs_upper_de = NULL; static const int num_switchers_upper_de = 3; @@ -247,9 +237,7 @@ static const lv_btnmatrix_ctrl_t attributes_numbers_de[] = { \ static const int num_modifiers_numbers_de = 0; -static const int modifier_idxs_numbers_de[] = { \ - \ -}; +static const int * const modifier_idxs_numbers_de = NULL; static const int num_switchers_numbers_de = 2; @@ -281,9 +269,7 @@ static const lv_btnmatrix_ctrl_t attributes_special_de[] = { \ static const int num_modifiers_special_de = 0; -static const int modifier_idxs_special_de[] = { \ - \ -}; +static const int * const modifier_idxs_special_de = NULL; static const int num_switchers_special_de = 3; @@ -369,9 +355,7 @@ static const lv_btnmatrix_ctrl_t attributes_lower_es[] = { \ static const int num_modifiers_lower_es = 0; -static const int modifier_idxs_lower_es[] = { \ - \ -}; +static const int * const modifier_idxs_lower_es = NULL; static const int num_switchers_lower_es = 3; @@ -403,9 +387,7 @@ static const lv_btnmatrix_ctrl_t attributes_upper_es[] = { \ static const int num_modifiers_upper_es = 0; -static const int modifier_idxs_upper_es[] = { \ - \ -}; +static const int * const modifier_idxs_upper_es = NULL; static const int num_switchers_upper_es = 3; @@ -437,9 +419,7 @@ static const lv_btnmatrix_ctrl_t attributes_numbers_es[] = { \ static const int num_modifiers_numbers_es = 0; -static const int modifier_idxs_numbers_es[] = { \ - \ -}; +static const int * const modifier_idxs_numbers_es = NULL; static const int num_switchers_numbers_es = 2; @@ -471,9 +451,7 @@ static const lv_btnmatrix_ctrl_t attributes_special_es[] = { \ static const int num_modifiers_special_es = 0; -static const int modifier_idxs_special_es[] = { \ - \ -}; +static const int * const modifier_idxs_special_es = NULL; static const int num_switchers_special_es = 3; @@ -559,9 +537,7 @@ static const lv_btnmatrix_ctrl_t attributes_lower_fr[] = { \ static const int num_modifiers_lower_fr = 0; -static const int modifier_idxs_lower_fr[] = { \ - \ -}; +static const int * const modifier_idxs_lower_fr = NULL; static const int num_switchers_lower_fr = 3; @@ -593,9 +569,7 @@ static const lv_btnmatrix_ctrl_t attributes_upper_fr[] = { \ static const int num_modifiers_upper_fr = 0; -static const int modifier_idxs_upper_fr[] = { \ - \ -}; +static const int * const modifier_idxs_upper_fr = NULL; static const int num_switchers_upper_fr = 3; @@ -627,9 +601,7 @@ static const lv_btnmatrix_ctrl_t attributes_numbers_fr[] = { \ static const int num_modifiers_numbers_fr = 0; -static const int modifier_idxs_numbers_fr[] = { \ - \ -}; +static const int * const modifier_idxs_numbers_fr = NULL; static const int num_switchers_numbers_fr = 2; @@ -661,9 +633,7 @@ static const lv_btnmatrix_ctrl_t attributes_special_fr[] = { \ static const int num_modifiers_special_fr = 0; -static const int modifier_idxs_special_fr[] = { \ - \ -}; +static const int * const modifier_idxs_special_fr = NULL; static const int num_switchers_special_fr = 3; diff --git a/squeek2lvgl b/squeek2lvgl index 5faaf14..01c343b 160000 --- a/squeek2lvgl +++ b/squeek2lvgl @@ -1 +1 @@ -Subproject commit 5faaf14831c915132c229b0ddef0931ab6ce7cd3 +Subproject commit 01c343b96cec50880a1dca3af6a8f40be89b8149