CPP: Exclude variables that are part of an interface.

This commit is contained in:
Geoffrey White
2018-11-16 21:24:18 +00:00
parent b70c572e34
commit 2d07410f97
3 changed files with 3 additions and 3 deletions

View File

@@ -2,4 +2,3 @@
| test.c:9:5:9:14 | globalInt5 | The variable globalInt5 is only accessed in $@ and should be scoped accordingly. | test.c:19:6:19:10 | func1 | func1 |
| test.c:10:5:10:14 | globalInt6 | The variable globalInt6 is only accessed in $@ and should be scoped accordingly. | test.c:19:6:19:10 | func1 | func1 |
| test.c:14:5:14:14 | globalInt9 | The variable globalInt9 is only accessed in $@ and should be scoped accordingly. | test.c:19:6:19:10 | func1 | func1 |
| test.c:17:5:17:13 | externInt | The variable externInt is only accessed in $@ and should be scoped accordingly. | test.c:19:6:19:10 | func1 | func1 |

View File

@@ -14,7 +14,7 @@ int *addrGlobalInt8 = &globalInt8; // GOOD [used in func1, func2]
int globalInt9; // GOOD [used at file level and in func1] [FALSE POSITIVE]
int *addrGlobalInt9 = &globalInt9; // GOOD [used in func1, func2]
int externInt; // GOOD [extern'd so could be part of an interface] [FALSE POSITIVE]
int externInt; // GOOD [extern'd so could be part of an interface]
void func1()
{