| Summary: | krazy warns about QByteArray::endsWith(const char *) | ||
|---|---|---|---|
| Product: | [Developer tools] krazy | Reporter: | Jan Kundrát <jkt> |
| Component: | general | Assignee: | Allen Winter <winter> |
| Status: | CONFIRMED --- | ||
| Severity: | normal | CC: | schwarzer |
| Priority: | NOR | ||
| Version First Reported In: | unspecified | ||
| Target Milestone: | --- | ||
| Platform: | unspecified | ||
| OS: | Linux | ||
| Latest Commit: | Version Fixed/Implemented In: | ||
| Sentry Crash Report: | |||
|
Description
Jan Kundrát
2012-11-17 21:31:15 UTC
Yep. You found one of the major complaints with Krazy; namely that it has no real C++ parsing capabilities. In this case, krazy has no idea that currentLine is a QByteArray since it won't look in Parser.h to find the type of the variable.
So.. in the meantime until we get better C++ parsing capabilities you can tell Krazy to skip that line by adding the //krazy::exclude=strings comment to the lines with the false positives.
Like so:
if (currentLine.endsWith("}\r\n")) { //krazy:exclude=strings
and
if (str.endsWith("\r\n")) //krazy:exclude=strings
*** Bug 356733 has been marked as a duplicate of this bug. *** |