From 98352587af77f492bf54bdbc1282b324c2c1e984 Mon Sep 17 00:00:00 2001 From: Hao Fang Date: Sat, 17 Jun 2023 20:59:00 +0800 Subject: [PATCH 27/48] uadk_engine: cleanup empty-body warning in v1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fix the warning: [-Wempty-body] suggest braces around empty body in an ‘if’ statement. Just simplify the code. Signed-off-by: Hao Fang --- src/v1/utils/engine_log.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/v1/utils/engine_log.c b/src/v1/utils/engine_log.c index ef009e5..330defb 100644 --- a/src/v1/utils/engine_log.c +++ b/src/v1/utils/engine_log.c @@ -158,8 +158,7 @@ void ENGINE_LOG_LIMIT(int level, int times, int limit, const char *fmt, ...) fprintf(g_kae_debug_log_file, "\n"); if (ftell(g_kae_debug_log_file) > KAE_LOG_MAX_SIZE) { kae_save_log(g_kae_debug_log_file); - if (ftruncate(g_kae_debug_log_file->_fileno, 0)) - ; + ftruncate(g_kae_debug_log_file->_fileno, 0); fseek(g_kae_debug_log_file, 0, SEEK_SET); } pthread_mutex_unlock(&g_debug_file_mutex); -- 2.25.1