Date: prev next · Thread: first prev next last
2014 Archives by date, by thread · List index


Hi,

I gave a try to cpplint
(http://google-styleguide.googlecode.com/svn/trunk/cpplint/cpplint.py) with
some changes so it scan subdirectories.
Except pure formatting warnings, it reports things like this:
1) ./drawinglayer/source/primitive2d/polygonprimitive2d.cxx:274:  Consider
using rand_r(...) instead of rand(...) for improved thread safety. 
[runtime/threadsafe_fn]
(other functions quoted in the py script:
 asctime_r, ctime_r, getgrgid_r, getgrnam_r, getlogin_r, getpwnam_r,
getpwuid_r, gmtime_r, localtime_r, strtok_r, ttyname_r)

2) ./fpicker/source/win32/filepicker/comptr.hxx:100:  Unary operator& is
dangerous.  Do not use it.  [runtime/operator] [4]

3) ./crashrep/source/unx/main.cxx:64:  For a static/global string constant,
use a C style string instead: "static char g_strProductKey[]". 
[runtime/string]

4) ./sd/source/ui/remotecontrol/Transmitter.cxx:10:  Streams are highly
discouraged.  [readability/streams]

5) ./sd/source/ui/remotecontrol/mDNSResponder/CommonServices.h:488:  Are you
taking an address of a cast?  This is dangerous: could be a temp var.  Take
the address before doing the cast, rather than after  [runtime/casting]

6) ./include/comphelper/sequenceashashmap.hxx:81:  Single-argument
constructors should be marked explicit.  [runtime/explicit]

7) ./oox/source/helper/binaryoutputstream.cxx:122:  Do not use
variable-length arrays.  Use an appropriately named ('k' followed by
CamelCase) compile-time constant for the size.  [runtime/arrays]

There are other different types of warnings about headers/include guards but
would you have some opinion about these first?

Julien




--
View this message in context: http://nabble.documentfoundation.org/About-cpplint-tp4105821.html
Sent from the Dev mailing list archive at Nabble.com.

Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.