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:39 UTC
[incubator-nuttx] 05/07: Finetuning false positive
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 5e5b6c206993815f8bf11598825e22ca6e726517
Author: Johanne Schock <jo...@nivus.com>
AuthorDate: Sun Mar 8 22:37:39 2020 +0100
Finetuning false positive
---
tools/nxstyle.c | 15 +++++++--------
1 file changed, 7 insertions(+), 8 deletions(-)
diff --git a/tools/nxstyle.c b/tools/nxstyle.c
index 9edd48f..d704df3 100644
--- a/tools/nxstyle.c
+++ b/tools/nxstyle.c
@@ -941,15 +941,14 @@ int main(int argc, char **argv, char **envp)
ncomment++;
}
- if (!strncmp(&line[ii], "define", 6))
+ rhcomment = n;
+
+ if (!strncmp(&line[ii], "define", 6)
+ && prevrhcmt != 0 && n != prevrhcmt)
{
- rhcomment = n;
- if (prevrhcmt != 0 && n != prevrhcmt)
- {
- rhcomment = prevrhcmt;
- WARN("Wrong column position of comment right of code",
- lineno, n);
- }
+ rhcomment = prevrhcmt;
+ WARN("Wrong column position of comment right of code",
+ lineno, n);
}
}
}