diff options
author | dyamy-lee <dyamy.lee@samsung.com> | 2020-12-01 18:15:46 +0900 |
---|---|---|
committer | dyamy-lee <dyamy.lee@samsung.com> | 2020-12-01 18:53:10 +0900 |
commit | ba36c7d0cc1f3d8c376d26aeb3cad68d3070595a (patch) | |
tree | 943db909300dec7d07ee320e8207bd2414100db6 | |
parent | f4a1112f09b6676a03e0c9e41af91a7ebf8aa0c3 (diff) | |
download | firmware-update-system-ui-ba36c7d0cc1f3d8c376d26aeb3cad68d3070595a.tar.gz firmware-update-system-ui-ba36c7d0cc1f3d8c376d26aeb3cad68d3070595a.tar.bz2 firmware-update-system-ui-ba36c7d0cc1f3d8c376d26aeb3cad68d3070595a.zip |
remove not used variables and file, also use unused variable
Change-Id: Ied74cefdc07b2f306a205fa59e7fec0e2e516202
-rw-r--r-- | base/base_main.c | 14 | ||||
-rw-r--r-- | fota_gui_wearable/fota_gui_ro_wearable_main.c | 15 | ||||
-rw-r--r-- | rw-update-ani-wearable/rw-update-log.h | 105 | ||||
-rw-r--r-- | rw-update-ani-wearable/rw-update_new_cairo_w_360_360.c | 2 |
4 files changed, 7 insertions, 129 deletions
diff --git a/base/base_main.c b/base/base_main.c index 129d1d2..b66b1b9 100644 --- a/base/base_main.c +++ b/base/base_main.c @@ -31,16 +31,10 @@ #include "gui_general.h" #include "gui_util.h" #include "base_gui.h" -/* -unsigned int __log_level__ = - (LOG_DEBUG | LOG_FLASH | LOG_FILE | LOG_FUNCS | LOG_GUI | LOG_SSENGINE | LOG_INFO); - */ + FILE *__log_out_file__; static int s_prog_percent = 0; -static int s_last_prog_percent = 0; - -static int s_pid = -1; static int wait_main(void) { @@ -69,6 +63,7 @@ static int wait_main(void) int main(int argc, char **argv) { + int ret = 0; #if WAIT int opt = 0; int index = 0; @@ -90,7 +85,7 @@ int main(int argc, char **argv) switch (index) { case 0: { - int ret = wait_main(); + ret = wait_main(); return ret; } case 1: @@ -105,9 +100,8 @@ int main(int argc, char **argv) break; } #else - int ret = 0; ret = wait_main(); #endif _exit_stdio(); - return 0; + return ret; } diff --git a/fota_gui_wearable/fota_gui_ro_wearable_main.c b/fota_gui_wearable/fota_gui_ro_wearable_main.c index 7e8d461..1b8f40c 100644 --- a/fota_gui_wearable/fota_gui_ro_wearable_main.c +++ b/fota_gui_wearable/fota_gui_ro_wearable_main.c @@ -32,18 +32,9 @@ #include "gui_util.h" #include "fota_gr_ro_wearable.h" -//#define WAIT -//#undef WAIT -/* -unsigned int __log_level__ = - (LOG_DEBUG | LOG_FLASH | LOG_FILE | LOG_FUNCS | LOG_GUI | LOG_SSENGINE | LOG_INFO); -*/ FILE *__log_out_file__; static int s_prog_percent = 0; -static int s_last_prog_percent = 0; - -static int s_pid = -1; static int wait_main_fota_ro(void) { @@ -72,6 +63,7 @@ static int wait_main_fota_ro(void) int main(int argc, char **argv) { + int ret = 0; #ifdef WAIT int opt = 0; int index = 0; @@ -93,7 +85,7 @@ int main(int argc, char **argv) switch (index) { case 0: { - int ret = wait_main_fota_ro(); + ret = wait_main_fota_ro(); return ret; } case 1: @@ -108,9 +100,8 @@ int main(int argc, char **argv) break; } #else - int ret = 0; ret = wait_main_fota_ro(); #endif _exit_stdio(); - return 0; + return ret; } diff --git a/rw-update-ani-wearable/rw-update-log.h b/rw-update-ani-wearable/rw-update-log.h deleted file mode 100644 index 5db56ce..0000000 --- a/rw-update-ani-wearable/rw-update-log.h +++ /dev/null @@ -1,105 +0,0 @@ -/* - * firmware-update-system-ui - * - * Copyright (c) 2017 Samsung Electronics Co., Ltd. - * - * Licensed under the Apache License, Version 2.0 (the License); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#ifndef __FOTA_LOG_H__ -#define __FOTA_LOG_H__ - -#include <stdio.h> -#include <dlog.h> - -#ifdef LOG_TAG -#undef LOG_TAG -#endif - -#define LOG_TAG "FOTA_GUI_RW" - -#define COLOR_RED "\033[0;31m" -#define COLOR_GREEN "\033[0;32m" -#define COLOR_BROWN "\033[0;33m" -#define COLOR_BLUE "\033[0;34m" -#define COLOR_PURPLE "\033[0;35m" -#define COLOR_CYAN "\033[0;36m" -#define COLOR_LIGHTBLUE "\033[0;37m" -#define COLOR_END "\033[0;m" - -#define _DEBUG_SECURE_LOG(fmt, args...) SECURE_SLOGD(fmt, ##args) -#define _DEBUG_SECURE_EXCEPTION(fmt, args...) SECURE_SLOGE(COLOR_RED"* Critical * " fmt COLOR_END, ##args) - -#define _DEBUG_LOG(fmt, args...) SLOGI(fmt, ##args) -#define _DEBUG_INFO(fmt, args...) SLOGI(COLOR_GREEN fmt COLOR_END, ##args) -#define _DEBUG_WARNING(fmt, args...) SLOGW(COLOR_BLUE"* Warning * " fmt COLOR_END, ##args) -#define _DEBUG_CHECK(fmt, args...) SLOGI(COLOR_LIGHTBLUE fmt, ##args) -#define _DEBUG_EXCEPTION(fmt, args...) SLOGE(COLOR_RED"* Critical * " fmt COLOR_END, ##args) -#define _FUNC_ENTER SLOGI(COLOR_GREEN"ENTER >>>>"COLOR_END) -#define _FUNC_EXIT SLOGI(COLOR_GREEN"EXIT <<<<"COLOR_END) - -/* - * DEBUGGING FEATURE - */ - -extern unsigned int __log_level__; -extern FILE *__log_out_file__; - -#define LOG_INFO (1<<8) -#define LOG_RWANI (1<<7) -#define LOG_FUNCS (1<<6) -#define LOG_GUI (1<<5) -#define LOG_DEBUG (1<<4) -#define LOG_FILE (1<<3) -#define LOG_FLASH (1<<2) - -#define LOG_PRFIX "FOTA_GUI_RW" - -#define DEBUG_STDOUT -//#define DEBUG_FILE - -#ifdef DEBUG_STDOUT -#define LOGE(s, args...) printf(LOG_PRFIX "/ERROR(%s) " s, __func__, ##args) // Error log -#define LOGL(mask, s, args...) do { if ((mask) & __log_level__) \ - printf(LOG_PRFIX "/(%s): " s, __func__, ##args); } while (0) -#define LOG(s, args...) LOGL(LOG_DEBUG, s, ##args) - -#elif defined(DEBUG_FILE) -#define LOGE(s, args...) fprintf(__log_out_file__, LOG_PRFIX "/ERROR(%s) " s, __func__, ##args) -#define LOGL(mask, s, args...) do { if ((mask) & __log_level__) \ - fprintf(__log_out_file__, LOG_PRFIX "/(%s): " s , __func__, ##args); } while (0) -#define LOG(s, args...) LOGL(LOG_DEBUG, s, ##args) - -#elif defined(DEBUG_STDOUT_FILE) // debug printf -#define LOGE(s, args...) do {\ - printf(LOG_PRFIX "/ERROR(%s) " s, __func__, ##args);\ - fprintf(__log_out_file__, LOG_PRFIX "/ERROR(%s) " s, __func__, ##args);\ - } while (0) -#define LOGL(mask, s, args...) do { \ - if ((mask) & __log_level__) {\ - printf(LOG_PRFIX "/(%s): " s , __func__, ##args);\ - fprintf(__log_out_file__, LOG_PRFIX "/(%s): " s, __func__, ##args);\ - } \ - } while (0) -#define LOG(s, args...) LOGL(LOG_DEBUG, s, ##args) - -#else -#define LOGE(s, args...) -#define LOGL(mask, s, args...) -#define LOG(s, args...) - -#endif - - -#endif /* __FOTA_LOG_H__ */ - diff --git a/rw-update-ani-wearable/rw-update_new_cairo_w_360_360.c b/rw-update-ani-wearable/rw-update_new_cairo_w_360_360.c index 52c2c79..e859c13 100644 --- a/rw-update-ani-wearable/rw-update_new_cairo_w_360_360.c +++ b/rw-update-ani-wearable/rw-update_new_cairo_w_360_360.c @@ -67,9 +67,7 @@ static CairoInfo cairoinfo; #define TEXT_FONT_SIZE_MIN 16 static cairo_surface_t *img_surf_main = NULL; -static cairo_surface_t *img_surf_popup = NULL; static cairo_surface_t *img_surf_main_txt = NULL; -static cairo_surface_t *img_surf_prog[PROGRESS_IMG_CNT] = {NULL,}; static cairo_surface_t *img_surf_num[PROGRESS_NUM_CNT] = {NULL,}; static cairo_surface_t *img_surf_slash = NULL; |