You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by "pussuw (via GitHub)" <gi...@apache.org> on 2023/08/24 10:37:00 UTC
[GitHub] [nuttx-apps] pussuw commented on pull request #1992: nshlib/nsh_console.h: Add nsh_none, where empty output can be forwarded
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: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org