#define UPUT_SET_CHECK_POINT1(appType, tag, argNum1, v1, ...) \
if(NUMARGS(##__VA_ARGS__) == 0) \
UPUT_SET_CHECK_POINTx(1, appType, tag, argNum1, v1, UPUT_P_INVALID, 0, UPUT_P_INVALID, 0, UPUT_P_INVALID, 0, UPUT_P_INVALID, 0, __FILE__, __LINE__, UPUT_SEQUENTIAL); \
else \
UPUT_SET_CHECK_POINTx(1, appType, tag, argNum1, v1, UPUT_P_INVALID, 0, UPUT_P_INVALID, 0, UPUT_P_INVALID, 0, UPUT_P_INVALID, 0, __FILE__, __LINE__ , __VA_ARGS__)
因此,当VA_ARGS为空时,我会收到编译时错误“在 ')' 标记之前的预期主表达式”。任何修复编译错误的方法。
void UPUT_SET_CHECK_POINTx(int numArg, CtblAppType appType, int tag, UputArgPos argNum1, int v1, UputArgPos argNum2, int v2, UputArgPos argNum3, int v3, UputArgPos argNum4, int v4, UputArgPos argNum5, int v5, char* fileName, unsigned int lineNumber, UputCheckPointAlgo checkPointAlgo=UPUT_SEQUENTIAL);