fix warnings
This commit is contained in:
@@ -139,16 +139,6 @@ static inline void _out_null(char character, void* buffer, size_t idx, size_t ma
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// internal output function wrapper
|
|
||||||
static inline void _out_fct(char character, void* buffer, size_t idx, size_t maxlen)
|
|
||||||
{
|
|
||||||
(void)idx; (void)maxlen;
|
|
||||||
if (character) {
|
|
||||||
// buffer is the output fct pointer
|
|
||||||
((out_fct_wrap_type*)buffer)->fct(character, ((out_fct_wrap_type*)buffer)->arg);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// internal secure strlen
|
// internal secure strlen
|
||||||
// \return The length of the string (excluding the terminating 0) limited by 'maxsize'
|
// \return The length of the string (excluding the terminating 0) limited by 'maxsize'
|
||||||
@@ -186,7 +176,8 @@ static size_t _out_rev(out_fct_type out, char* buffer, size_t idx, size_t maxlen
|
|||||||
|
|
||||||
// pad spaces up to given width
|
// pad spaces up to given width
|
||||||
if (!(flags & FLAGS_LEFT) && !(flags & FLAGS_ZEROPAD)) {
|
if (!(flags & FLAGS_LEFT) && !(flags & FLAGS_ZEROPAD)) {
|
||||||
for (size_t i = len; i < width; i++) {
|
size_t i;
|
||||||
|
for (i = len; i < width; i++) {
|
||||||
out(' ', buffer, idx++, maxlen);
|
out(' ', buffer, idx++, maxlen);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -275,8 +275,11 @@ bool lv_cpicker_set_hsv(lv_obj_t * cpicker, lv_color_hsv_t hsv)
|
|||||||
*/
|
*/
|
||||||
bool lv_cpicker_set_color(lv_obj_t * cpicker, lv_color_t color)
|
bool lv_cpicker_set_color(lv_obj_t * cpicker, lv_color_t color)
|
||||||
{
|
{
|
||||||
|
lv_color32_t c32;
|
||||||
|
c32 = lv_color_to32(color);
|
||||||
|
|
||||||
return lv_cpicker_set_hsv(cpicker,
|
return lv_cpicker_set_hsv(cpicker,
|
||||||
lv_color_rgb_to_hsv(LV_COLOR_GET_R(color), LV_COLOR_GET_G(color), LV_COLOR_GET_B(color)));
|
lv_color_rgb_to_hsv(c32.ch.red, c32.ch.green, c32.ch.blue));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -619,7 +622,8 @@ static void draw_disc_grad(lv_obj_t * cpicker, const lv_area_t * mask, lv_opa_t
|
|||||||
lv_point_t triangle_points[3];
|
lv_point_t triangle_points[3];
|
||||||
lv_style_t style;
|
lv_style_t style;
|
||||||
lv_style_copy(&style, &lv_style_plain);
|
lv_style_copy(&style, &lv_style_plain);
|
||||||
for(uint16_t i = start_angle; i <= end_angle; i+= LV_CPICKER_DEF_QF) {
|
uint16_t i;
|
||||||
|
for(i = start_angle; i <= end_angle; i+= LV_CPICKER_DEF_QF) {
|
||||||
style.body.main_color = angle_to_mode_color(cpicker, i);
|
style.body.main_color = angle_to_mode_color(cpicker, i);
|
||||||
style.body.grad_color = style.body.main_color;
|
style.body.grad_color = style.body.main_color;
|
||||||
|
|
||||||
@@ -704,7 +708,8 @@ static void draw_rect_grad(lv_obj_t * cpicker, const lv_area_t * mask, lv_opa_t
|
|||||||
style.body.shadow.width = 0;
|
style.body.shadow.width = 0;
|
||||||
style.body.opa = LV_OPA_COVER;
|
style.body.opa = LV_OPA_COVER;
|
||||||
|
|
||||||
for(uint16_t i = 0; i < 360; i += i_step) {
|
uint16_t i;
|
||||||
|
for(i = 0; i < 360; i += i_step) {
|
||||||
style.body.main_color = angle_to_mode_color(cpicker, i);
|
style.body.main_color = angle_to_mode_color(cpicker, i);
|
||||||
style.body.grad_color = style.body.main_color;
|
style.body.grad_color = style.body.main_color;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user