cppcheck Questions

3

Solved

Cppcheck has detected a potential problem in a code like this: float a, b, c; int count = sscanf(data, "%f,%f,%f", &a, &b, &c); It says that: "scanf without field width limits can cr...
Rhomb asked 15/2, 2012 at 11:53

3

Solved

Cppcheck shows the following warning for scanf: Message: scanf without field width limits can crash with huge input data. To fix this error message add a field width specifier: %s => %20s %i =>...
Hervey asked 11/8, 2011 at 7:43

2

Solved

Cppcheck (version 1.46.1) gives the following warning for an enum like this one: enum DATABASE_TYPE { DATABASE_TYPE_UNKNOWN = -1, // <- line of warning DATABASE_TYPE_ORACLE, DATABASE_TYPE_MS...
Falcate asked 2/2, 2011 at 9:16

© 2022 - 2024 — McMap. All rights reserved.