CPP: Fix false positive.

This commit is contained in:
Geoffrey White
2019-01-24 11:33:50 +00:00
parent e1d31bf117
commit 02c69a744f
3 changed files with 2 additions and 2 deletions

View File

@@ -1,2 +1 @@
| test.cpp:24:4:24:7 | arr3 | Array of size 3 passed to $@ which expects an array of size 4. | test.cpp:8:6:8:6 | g | g |
| test.cpp:40:9:40:12 | data | Array of size 0 passed to $@ which expects an array of size 4. | test.cpp:9:6:9:6 | h | h |

View File

@@ -37,7 +37,7 @@ void test(float f3[3], float f4[4], float f5[5], float *fp)
ms = (myStruct *)malloc(sizeof(myStruct) + (4 * sizeof(float)));
ms->num = 4;
ms->data[0] = ms->data[1] = ms->data[2] = ms->data[3] = 0;
h(ms->data); // GOOD [FALSE POSITIVE]
h(ms->data); // GOOD
}
{