本帖最后由 lwsandy 于 2017-2-21 14:02 编辑
代码:
time2 = Clock_Time();
tClockTime diff = time2-time;
PRINTF("%d packets. Elapsed time: %d ms. App throughput: %d kbps.\n", NUM_PACKETS, diff, (int)((float)NUM_PACKETS*20*8/diff));
编译报警..\user\src\sample_service.c(400): warning: #177-D: variable "diff" was declared but never referenced
代码中,printf()函数不是引用了diff这个变量了吗?为什么还会报警。????
找到问题了,在这里定义了
void PRINT_MESG_UART(const char * format, ... );
#define PRINTF PRINT_MESG_UART
|