Hi Martin,

On Mon, 22 Mar 2010, Martin Ettl wrote:
> i have checked the current git head with cppcheck ( a static code 
> analysis tool, http://sourceforge.net/projects/cppcheck/). It is an 
> allready very powerfull tool that makes some suggestions, how to improve 
> performance of the code.
> 
> Here is a snipped of the scan:
> ....
> [./src/mds/MDSMap.h:236]: (possible style) Pre-Incrementing variable 'p' is 
> preferred to Post-Incrementing
> [./src/mds/MDSMap.h:256]: (possible style) Pre-Incrementing variable 'p' is 
> preferred to Post-Incrementing
> [./src/mds/MDSMap.h:263]: (possible style) Pre-Incrementing variable 'p' is 
> preferred to Post-Incrementing
> [./src/mds/MDSMap.h:280]: (possible style) Pre-Incrementing variable 'p' is 
> preferred to Post-Incrementing
> [./src/mds/MDSMap.h:291]: (possible style) Pre-Incrementing variable 'p' is 
> preferred to Post-Incrementing
> [./src/include/LogEntry.h:100]: (possible style) Pre-Incrementing variable 
> 'p' is preferred to Post-Incrementing
> [./src/ceph.cc:317]: (possible style) Pre-Incrementing variable 'p' is 
> preferred to Post-Incrementing
> [./src/mds/MDSMap.h:247]: (possible style) Use failed.empty() instead of 
> failed.size() to guarantee fast code.
> ....
> 
> 
> Please refer the attached patch that chanes a few of this suggestions.
> What do you think about this? Does it boost the performance?

I don't think it'll affect performance in these cases, but stylistically 
it's an improvement, so I'll apply it.

Did cppcheck have anything else to say?

Thanks!
sage


------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Ceph-devel mailing list
Ceph-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ceph-devel

Reply via email to