pussuw commented on PR #1992:
URL: https://github.com/apache/nuttx-apps/pull/1992#issuecomment-1691434239

   @xiaoxiang781216 @pkarashchenko this is what I came up with regard to 
https://github.com/apache/nuttx-apps/pull/1987
   
   The inline function is needed to eat the variadic argument list, even though 
`if (0) (v, ##__VA_ARGS__);` is perfectly valid C code, it does produce a 
warning, the compiler is sad that the comma expression is meaningless. Even 
casting the whole statement to void does not suppress the warning.
   
   nsh_parse.c:2739:39: error: left-hand operand of comma expression has no 
effect [-Werror=unused-value]
    2739 |       nsh_error(vtbl, g_fmttoomanyargs, cmd);
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to