Fix compiler warning

This commit is contained in:
fvanroie 2020-04-11 20:08:18 +02:00
parent bc7d6ffc29
commit 51c9af9086
2 changed files with 7 additions and 8 deletions

View File

@ -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);
}

View File

@ -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);