Review Request 128591: error location fix
Anton Anikin
anton.anikin at htower.ru
Thu Aug 4 07:18:56 UTC 2016
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/128591/
-----------------------------------------------------------
(Updated Aug. 4, 2016, 3:18 a.m.)
Status
------
This change has been marked as submitted.
Review request for KDevelop.
Changes
-------
Submitted with commit 38b095aa8514ed9a4aa5b986df8b5f39e3cc91b5 by Kevin Funk on behalf of Anton Anikin to branch master.
Repository: kdev-cppcheck
Description
-------
Let some test.cpp file contain such code:
int x = 0; // line 100
.... // lines, which don't use the value of 'x' variable
x = 10; // line 120
Then cppcheck will produce such XML output:
<error id="redundantAssignment" ... >
<location file="test.cpp" line="120"/>
<location file="test.cpp" line="100"/>
</error>
Old code set error location to line 100 of test.cpp (last <location> element), but it's wrong behaviour - error position must be at line 120. Current (new) version uses only first <location> element of the <error> item for getting information about error position.
Diffs
-----
parsers/cppcheckparser.cpp aad0dca
tests/test_cppcheckparser.cpp ff017e6
Diff: https://git.reviewboard.kde.org/r/128591/diff/
Testing
-------
Thanks,
Anton Anikin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20160804/d713de60/attachment.html>
More information about the KDevelop-devel
mailing list