Fix compile error of micro_thread with gcc 8.3.

This commit is contained in:
Xin Wang 2020-11-25 16:46:38 +08:00 committed by fengbojiang
parent 2c7595d6e9
commit 973ff95de2
2 changed files with 4 additions and 3 deletions

1
.gitignore vendored
View File

@ -28,3 +28,4 @@ app/nginx-1.16.0/Makefile
dpdk/.ci/ dpdk/.ci/
dpdk/.travis.yml dpdk/.travis.yml
.vscode/ .vscode/
.code.yml

View File

@ -543,7 +543,7 @@ do { \
register NS_MICRO_THREAD::MtFrame *fm = NS_MICRO_THREAD::MtFrame::Instance(); \ register NS_MICRO_THREAD::MtFrame *fm = NS_MICRO_THREAD::MtFrame::Instance(); \
if (fm && fm->GetLogAdpt() && fm->GetLogAdpt()->CheckDebug()) \ 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); \ __FILE__, __LINE__, __FUNCTION__, ##args); \
} \ } \
} while (0) } while (0)
@ -553,7 +553,7 @@ do { \
register NS_MICRO_THREAD::MtFrame *fm = NS_MICRO_THREAD::MtFrame::Instance(); \ register NS_MICRO_THREAD::MtFrame *fm = NS_MICRO_THREAD::MtFrame::Instance(); \
if (fm && fm->GetLogAdpt() && fm->GetLogAdpt()->CheckTrace()) \ 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); \ __FILE__, __LINE__, __FUNCTION__, ##args); \
} \ } \
} while (0) } while (0)
@ -563,7 +563,7 @@ do { \
register NS_MICRO_THREAD::MtFrame *fm = NS_MICRO_THREAD::MtFrame::Instance(); \ register NS_MICRO_THREAD::MtFrame *fm = NS_MICRO_THREAD::MtFrame::Instance(); \
if (fm && fm->GetLogAdpt() && fm->GetLogAdpt()->CheckError()) \ 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); \ __FILE__, __LINE__, __FUNCTION__, ##args); \
} \ } \
} while (0) } while (0)