Review Request: value.cpp: 224: comparison between signed and unsigned integer

Guy Maurel guy-kde at maurel.de
Mon Oct 12 18:58:15 BST 2009



> On 2009-10-12 08:55:54, David Jarvie wrote:
> > Always use static_cast<unsigned>() etc. rather than the C-style (unsigned) 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.

right, OK
see: value-gm-3.diff


- Guy


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


On 2009-10-12 17:57:33, Guy Maurel wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://reviewboard.kde.org/r/1830/
> -----------------------------------------------------------
> 
> (Updated 2009-10-12 17:57:33)
> 
> 
> Review request for kdelibs.
> 
> 
> Summary
> -------
> 
> The kdelibs-Dashboard reports:
> /.../kdelibs/kjs/value.cpp:224: warning: comparison between signed and unsigned integer expressions
> 
> at
> Value* JSValue::getByIndex(ExecState* exec, unsigned propertyName) const
> 
> my proposal is to make a little change, a cast
> 
> 
> Diffs
> -----
> 
>   /trunk/KDE/kdelibs/kjs/value.cpp 1033934 
> 
> Diff: http://reviewboard.kde.org/r/1830/diff
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Guy
> 
>





More information about the kde-core-devel mailing list