From 973ff95de2a8309ebd7164fc12395b76ad231278 Mon Sep 17 00:00:00 2001 From: Xin Wang <2014126@163.com> Date: Wed, 25 Nov 2020 16:46:38 +0800 Subject: [PATCH] Fix compile error of micro_thread with gcc 8.3. --- .gitignore | 1 + app/micro_thread/micro_thread.h | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index cd28963ae..0029e4f3c 100644 --- a/.gitignore +++ b/.gitignore @@ -28,3 +28,4 @@ app/nginx-1.16.0/Makefile dpdk/.ci/ dpdk/.travis.yml .vscode/ +.code.yml diff --git a/app/micro_thread/micro_thread.h b/app/micro_thread/micro_thread.h index 9aa97231f..ae2cbdd2a 100644 --- a/app/micro_thread/micro_thread.h +++ b/app/micro_thread/micro_thread.h @@ -543,7 +543,7 @@ do { \ register NS_MICRO_THREAD::MtFrame *fm = NS_MICRO_THREAD::MtFrame::Instance(); \ if (fm && fm->GetLogAdpt() && fm->GetLogAdpt()->CheckDebug()) \ { \ - fm->GetLogAdpt()->LogDebug((char*)"[%-10s][%-4d][%-10s]"fmt, \ + fm->GetLogAdpt()->LogDebug((char*)"[%-10s][%-4d][%-10s]" fmt, \ __FILE__, __LINE__, __FUNCTION__, ##args); \ } \ } while (0) @@ -553,7 +553,7 @@ do { \ register NS_MICRO_THREAD::MtFrame *fm = NS_MICRO_THREAD::MtFrame::Instance(); \ if (fm && fm->GetLogAdpt() && fm->GetLogAdpt()->CheckTrace()) \ { \ - fm->GetLogAdpt()->LogTrace((char*)"[%-10s][%-4d][%-10s]"fmt, \ + fm->GetLogAdpt()->LogTrace((char*)"[%-10s][%-4d][%-10s]" fmt, \ __FILE__, __LINE__, __FUNCTION__, ##args); \ } \ } while (0) @@ -563,7 +563,7 @@ do { \ register NS_MICRO_THREAD::MtFrame *fm = NS_MICRO_THREAD::MtFrame::Instance(); \ if (fm && fm->GetLogAdpt() && fm->GetLogAdpt()->CheckError()) \ { \ - fm->GetLogAdpt()->LogError((char*)"[%-10s][%-4d][%-10s]"fmt, \ + fm->GetLogAdpt()->LogError((char*)"[%-10s][%-4d][%-10s]" fmt, \ __FILE__, __LINE__, __FUNCTION__, ##args); \ } \ } while (0)