写宏遇到的问题:warning: backslash and newline separated by space - C

原来是因为\ 后面多了一个空格

   附上一个刚刚写得调试用的例子:

[cpp]  view plain  copy
  1. #define desay_debug(_string,myValue) \  
  2.     do{\  
  3.          c_snprintf(desay_info, \  
  4.                   250 - 1, \  
  5.                   "\ndesay: File: %s  Line#: %d  Func: %s()\n !!!:message is %s value is %d\n", \  
  6.                   __FILE__, \  
  7.                   __LINE__, \  
  8.                   __func__, \  
  9.                   _string, \  
  10.                   myValue); \  
  11.         desayEvent.ui4_msg_id=DESAY_MESSAGE_ID;\  
  12.         desayEvent.ui4_data1=(UINT32)&desay_info[0];\  
  13.         a_am_get_app_handle_from_name(&h_app_desay,"homepage");\  
  14.         c_app_send_msg(h_app_desay,0,&desayEvent,sizeof(DESAY_MSG_T),NULL,NULL);\  
  15.     }while(0)  

猜你喜欢

转载自blog.csdn.net/aaa123524457/article/details/80207015
今日推荐