solve warnings

This commit is contained in:
Gabor Kiss-Vamosi
2018-10-05 15:15:19 +02:00
parent a539909972
commit 6df5de17c6
4 changed files with 18 additions and 19 deletions

View File

@@ -214,9 +214,6 @@ static void line_draw_skew(line_draw_t * main_line, const lv_area_t * mask, cons
lv_coord_t width; lv_coord_t width;
width = style->line.width; width = style->line.width;
#if LV_ANTIALIAS
lv_coord_t width_safe; /*`width_safe` is always >=1*/
#endif
/* The pattern stores the points of the line ending. It has the good direction and length. /* The pattern stores the points of the line ending. It has the good direction and length.
* The worth case is the 45° line where pattern can have 1.41 x `width` points*/ * The worth case is the 45° line where pattern can have 1.41 x `width` points*/
@@ -245,8 +242,7 @@ static void line_draw_skew(line_draw_t * main_line, const lv_area_t * mask, cons
width = i; width = i;
#if LV_ANTIALIAS #if LV_ANTIALIAS
width--; width--;
if(width == 0) width_safe = 1;
else width_safe = width;
#endif #endif
break; break;
} }
@@ -259,6 +255,9 @@ static void line_draw_skew(line_draw_t * main_line, const lv_area_t * mask, cons
} }
#if LV_ANTIALIAS #if LV_ANTIALIAS
lv_coord_t width_safe = width;
if(width == 0) width_safe = 1;
lv_coord_t aa_last_corner; lv_coord_t aa_last_corner;
aa_last_corner = 0; aa_last_corner = 0;
#endif #endif

View File

@@ -24,22 +24,21 @@ extern "C" {
* DEFINES * DEFINES
*********************/ *********************/
/*Possible log level. For compatibility declare it independently from `USE_LV_LOG`*/
#define LV_LOG_LEVEL_TRACE 0 /*A lot of logs to give detailed information*/
#define LV_LOG_LEVEL_INFO 1 /*Log important events*/
#define LV_LOG_LEVEL_WARN 2 /*Log if something unwanted happened but didn't caused problem*/
#define LV_LOG_LEVEL_ERROR 3 /*Only critical issue, when the system may fail*/
#define _LV_LOG_LEVEL_NUM 4
typedef uint8_t lv_log_level_t;
#if USE_LV_LOG
/********************** /**********************
* TYPEDEFS * TYPEDEFS
**********************/ **********************/
/*Possible log level. For compatibility declare it independently from `USE_LV_LOG`*/
enum
{
LV_LOG_LEVEL_TRACE, /*A lot of logs to give detailed information*/
LV_LOG_LEVEL_INFO, /*Log important events*/
LV_LOG_LEVEL_WARN, /*Log if something unwanted happened but didn't caused problem*/
LV_LOG_LEVEL_ERROR, /*Only critical issue, when the system may fail*/
_LV_LOG_LEVEL_NUM
};
typedef uint8_t lv_log_level_t;
#if USE_LV_LOG
/********************** /**********************
* GLOBAL PROTOTYPES * GLOBAL PROTOTYPES

View File

@@ -28,12 +28,12 @@ extern "C" {
* DEFINES * DEFINES
*********************/ *********************/
// Check windows // Check windows
#if __WIN64 #ifdef __WIN64
# define LV_MEM_ENV64 # define LV_MEM_ENV64
#endif #endif
// Check GCC // Check GCC
#if __GNUC__ #ifdef __GNUC__
# if __x86_64__ || __ppc64__ # if __x86_64__ || __ppc64__
# define LV_MEM_ENV64 # define LV_MEM_ENV64
# endif # endif

View File

@@ -18,6 +18,7 @@
#include "../lv_misc/lv_fs.h" #include "../lv_misc/lv_fs.h"
#include "../lv_misc/lv_ufs.h" #include "../lv_misc/lv_ufs.h"
#include "../lv_misc/lv_txt.h" #include "../lv_misc/lv_txt.h"
#include "../lv_misc/lv_log.h"
/********************* /*********************
* DEFINES * DEFINES