From 72288f445051442ccbb1db2c7e0ccec1faddf499 Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Sun, 24 Feb 2019 22:27:51 +0100 Subject: [PATCH] i18n: fix warnings --- lv_core/lv_i18n.c | 4 ++-- lv_core/lv_i18n.h | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lv_core/lv_i18n.c b/lv_core/lv_i18n.c index 8d7cf1b66..1a75869de 100644 --- a/lv_core/lv_i18n.c +++ b/lv_core/lv_i18n.c @@ -23,7 +23,7 @@ /********************** * STATIC PROTOTYPES **********************/ -static const void * lv_i18n_get_text_core(lv_i18n_trans_t * trans, const char * msg_id); +static const void * lv_i18n_get_text_core(const lv_i18n_trans_t * trans, const char * msg_id); /********************** * STATIC VARIABLES @@ -238,7 +238,7 @@ const void * lv_i18n_get_current_local(void) * STATIC FUNCTIONS **********************/ -static const void * lv_i18n_get_text_core(lv_i18n_trans_t * trans, const char * msg_id) +static const void * lv_i18n_get_text_core(const lv_i18n_trans_t * trans, const char * msg_id) { uint16_t i; for(i = 0; trans[i].msg_id != NULL; i++) { diff --git a/lv_core/lv_i18n.h b/lv_core/lv_i18n.h index 043a49349..894213bc0 100644 --- a/lv_core/lv_i18n.h +++ b/lv_core/lv_i18n.h @@ -49,12 +49,12 @@ typedef struct { typedef struct { const char * name; /*E.g. "en_GB"*/ - lv_i18n_trans_t * simple; /*Translations of simple texts where no plurals are used*/ - lv_i18n_trans_t * plurals[_LV_I18N_PLURAL_TYPE_NUM]; /*Translations of the plural forms*/ + const lv_i18n_trans_t * simple; /*Translations of simple texts where no plurals are used*/ + const lv_i18n_trans_t * plurals[_LV_I18N_PLURAL_TYPE_NUM]; /*Translations of the plural forms*/ uint8_t (*plural_rule)(int32_t num); /*Function pointer to get the correct plural form for a number*/ }lv_i18n_lang_t; -typedef lv_i18n_lang_t * lv_i18n_lang_pack_t; +typedef const lv_i18n_lang_t * lv_i18n_lang_pack_t; /********************** * GLOBAL PROTOTYPES