You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by gn...@apache.org on 2020/03/09 16:00:41 UTC

[incubator-nuttx] 07/07: Signal error for multiline comment right of #if

This is an automated email from the ASF dual-hosted git repository.

gnutt pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git

commit f764947c731fbc65d33aceb4da3e25513a2013c6
Author: Johanne Schock <jo...@nivus.com>
AuthorDate: Mon Mar 9 16:16:06 2020 +0100

    Signal error for multiline comment right of #if
---
 tools/nxstyle.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/tools/nxstyle.c b/tools/nxstyle.c
index 71ca4c2..9b7badd 100644
--- a/tools/nxstyle.c
+++ b/tools/nxstyle.c
@@ -968,6 +968,12 @@ int main(int argc, char **argv, char **envp)
                   /* Signal rhcomment, but ignore position */
 
                   rhcomment = -1;
+
+                  if (ncomment > 0 && !strncmp(&line[ii], "if", 2))
+                    {
+                      ERROR("No multiline comment right of code allowed here",
+                          lineno, n);
+                    }
                 }
             }