From 51c9af9086c4b824522f7a94391784cf773bd5c4 Mon Sep 17 00:00:00 2001 From: fvanroie Date: Sat, 11 Apr 2020 20:08:18 +0200 Subject: [PATCH] Fix compiler warning --- src/hasp_attribute.cpp | 9 ++++----- src/hasp_attribute.h | 6 +++--- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/src/hasp_attribute.cpp b/src/hasp_attribute.cpp index 4d62ed10..fe57b7c6 100644 --- a/src/hasp_attribute.cpp +++ b/src/hasp_attribute.cpp @@ -22,7 +22,7 @@ static uint16_t sdbm(const char * str) char c; // while(c = *str++) hash = c + (hash << 6) + (hash << 16) - hash; - while(c = (*(str++))) { + while((c = *str++)) { hash = tolower(c) + (hash << 6) - hash; } @@ -214,7 +214,6 @@ static void hasp_attribute_get_part_state(lv_obj_t * obj, const char * attr_in, } // Remove Trailing part digit - char attr[128]; if(part != LV_TABLE_PART_BG && len > 0) { len--; } @@ -792,17 +791,17 @@ static inline bool only_digits(const char * s) return strlen(s) == digits; } -static void hasp_out_int(lv_obj_t * obj, const char * attr, uint32_t val) +void hasp_out_int(lv_obj_t * obj, const char * attr, uint32_t val) { hasp_send_obj_attribute_int(obj, attr, val); } -static void hasp_out_str(lv_obj_t * obj, const char * attr, const char * data) +void hasp_out_str(lv_obj_t * obj, const char * attr, const char * data) { hasp_send_obj_attribute_str(obj, attr, data); } -static void hasp_out_color(lv_obj_t * obj, const char * attr, lv_color_t color) +void hasp_out_color(lv_obj_t * obj, const char * attr, lv_color_t color) { hasp_send_obj_attribute_color(obj, attr, color); } diff --git a/src/hasp_attribute.h b/src/hasp_attribute.h index 7d389ae2..40f0ef37 100644 --- a/src/hasp_attribute.h +++ b/src/hasp_attribute.h @@ -14,9 +14,9 @@ void hasp_process_obj_attribute(lv_obj_t * obj, const char * attr_p, const char } /* extern "C" */ #endif -static void hasp_out_int(lv_obj_t * obj, const char * attr, uint32_t val); -static void hasp_out_str(lv_obj_t * obj, const char * attr, const char * data); -static void hasp_out_color(lv_obj_t * obj, const char * attr, lv_color_t color); +void hasp_out_int(lv_obj_t * obj, const char * attr, uint32_t val); +void hasp_out_str(lv_obj_t * obj, const char * attr, const char * data); +void hasp_out_color(lv_obj_t * obj, const char * attr, lv_color_t color); bool check_obj_type(const char * lvobjtype, lv_hasp_obj_type_t haspobjtype); bool check_obj_type(lv_obj_t * obj, lv_hasp_obj_type_t haspobjtype);