...
| Code Block |
|---|
const int vals[] = {3, 4, 5};
memset((int *)vals, 0, sizeof(vals));
|
Compliant
...
Solution
If the intention is to allow the array values to be modified, do not declare the array as const.
...
...
| Code Block |
|---|
const int vals[] = {3, 4, 5};
memset((int *)vals, 0, sizeof(vals));
|
...
If the intention is to allow the array values to be modified, do not declare the array as const.
...