作者:
jba (簡簡單單的幸福)
2015-12-20 23:07:03開發平台(Platform): (Ex: VC++, GCC, Linux, ...)
cppcheck
額外使用到的函數庫(Library Used): (Ex: OpenGL, ...)
問題(Question):
使用cppcheck檢查程式碼
餵入的資料(Input):
目錄下的.c與.h檔
預期的正確結果(Expected Output):
錯誤結果(Wrong Output):
message: syntaxError
message id: Invalid number of character '{' when these macros are defined: ''.
程式碼(Code):(請善用置底文網頁, 記得排版)
#define CPU_STANDBY()\
{\
LD_OFF();\
RDLD_OFF();\ <= cppcheck指出這行有問題。
}
補充說明(Supplement):
目錄下的.h檔中,有許多macro,也許是macro的寫法讓cppcheck檢查出有問題,有什麼
辦法可以讓cppcheck跳過檢查macro呢?