Review Request: ExecState.cpp:225: warning: comparison between signed and unsigned integer expressions

David Jarvie djarvie at kde.org
Mon Oct 12 09:57:02 BST 2009


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://reviewboard.kde.org/r/1831/#review2612
-----------------------------------------------------------


Always use static_cast<size_t>() etc. rather than the C-style (size_t) cast. This is safer in that it only allows casts between compatible types, and has the advantage that it is clearer to people reading the code later that it has been done in a safe way.

- David


On 2009-10-11 16:31:46, Guy Maurel wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://reviewboard.kde.org/r/1831/
> -----------------------------------------------------------
> 
> (Updated 2009-10-11 16:31:46)
> 
> 
> Review request for kdelibs.
> 
> 
> Summary
> -------
> 
> The kdelibs-Dashboard reports:
> /.../kdelibs/kjs/ExecState.cpp:225: warning: comparison between signed and unsigned integer expressions
> 
> at
> void ExecState::quietUnwind(int depth)
> 
> my proposal is to make a little change, a cast
> 
> 
> Diffs
> -----
> 
>   /trunk/KDE/kdelibs/kjs/ExecState.cpp 1033934 
> 
> Diff: http://reviewboard.kde.org/r/1831/diff
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Guy
> 
>





More information about the kde-core-devel mailing list