Review Request 128591: error location fix

Anton Anikin anton.anikin at htower.ru
Thu Aug 4 07:17:14 UTC 2016


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/128591/#review98081
-----------------------------------------------------------


Ship it!




Ship It!

- Anton Anikin


On Aug. 3, 2016, 11:42 p.m., Anton Anikin wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/128591/
> -----------------------------------------------------------
> 
> (Updated Aug. 3, 2016, 11:42 p.m.)
> 
> 
> Review request for KDevelop.
> 
> 
> 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/85e0013d/attachment.html>


More information about the KDevelop-devel mailing list