d96c114171
clang-tidy modernize-make-shared
...
Change-Id: I3fa866bfb3093fc876474a9d9db29fe05dc2af3a
Reviewed-on: https://gerrit.libreoffice.org/25056
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Noel Grandin <noelgrandin@gmail.com >
2016-05-18 06:58:44 +00:00
14cd5182c5
Replace fallthrough comments with new SAL_FALLTHROUGH macro
...
...which (in LIBO_INTERNAL_ONLY) for Clang expands to [[clang::fallthrough]] in
preparation of enabling -Wimplicit-fallthrough. (This is only relevant for
C++11, as neither C nor old C++ has a way to annotate intended fallthroughs.)
Could use BOOST_FALLTHROUGH instead of introducing our own SAL_FALLTHROUGH, but
that would require adding back in dependencies on boost_headers to many
libraries where we carefully removed any remaining Boost dependencies only
recently. (At least make SAL_FALLTHROUGH strictly LIBO_INTERNAL_ONLY, so its
future evolution will not have any impact on the stable URE interface.) C++17
will have a proper [[fallthroug]], eventually removing the need for a macro
altogether.
Change-Id: I342a7610a107db7d7a344ea9cbddfd9714d7e9ca
2016-05-10 16:42:16 +02:00
0f3ac23d73
Insert explicit "break" when falling through to empty next case
...
...which itself only contains a "break" (or nothing at all at the end of the
"switch"), as otherwise Clang -Wimplicit-fallthrough would warn about these.
Change-Id: I25c1cf2ca74dfeba7ca0385ca8f1c1bf30bbf91b
2016-05-10 14:57:26 +02:00
3acbc64869
tdf#97499 Fixed containers parameters clearing #8
...
Change-Id: I82ca89ac483e9742be0d38a3c6882a240c7c38d8
Reviewed-on: https://gerrit.libreoffice.org/24499
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com >
2016-05-01 10:09:11 +00:00
783419657c
loplugin:salbool: sal_Bool[] -> bool[]
...
Change-Id: I3c5bf7a53c9ae173f8fce885ecf022f092aa43a9
2016-04-21 17:29:40 +02:00
e1af7f0c43
clang-tidy modernize-loop-convert in c*
...
Change-Id: I77d2548f8be97792660761e6156cd24734a95aaf
2016-04-21 11:03:55 +02:00
e7f330fa4a
loplugin:salbool: Automatic rewrite of sal_False/True
...
Change-Id: I47acc5590a935c7f9089231efbb1319664942f16
2016-04-20 17:25:37 +02:00
a3858ed3a7
Use cast to bool to normalize sal_Bool values
...
Change-Id: I8a886f752d2a16ec4c10656bcd0b3631647971b2
2016-04-20 17:25:31 +02:00
150ac9cf05
clean-up: unused using declarations and includes
...
Searched source for using declarations.
Checked if those symbols reappear in the source file,
even in comments or dead code but not in #include statements.
If they don't reappear, remove the declaration.
Remove includes whose symbol got removed.
Change-Id: Ibb77163f63c1120070e9518e3dc0a78c6c59fab0
Reviewed-on: https://gerrit.libreoffice.org/24148
Reviewed-by: Jochen Nitschke <j.nitschke+logerrit@ok.de >
Reviewed-by: Noel Grandin <noelgrandin@gmail.com >
Tested-by: Noel Grandin <noelgrandin@gmail.com >
2016-04-18 07:25:24 +00:00
c20cc7e79b
tdf#97499 Fixed containers parameters clearing #4
...
Change-Id: I7c96181399f4d7e62d4aceca404b22d68f903513
Reviewed-on: https://gerrit.libreoffice.org/23754
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Noel Grandin <noelgrandin@gmail.com >
2016-04-04 05:49:06 +00:00
62d1632498
tdf#97966 Drop 'static' keywords
...
Including no keywords from extern "C" blocks
Change-Id: I18ddafbf3d41f6779fb43e36ba1f1c48b37757a0
Reviewed-on: https://gerrit.libreoffice.org/23671
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Stephan Bergmann <sbergman@redhat.com >
2016-04-01 06:44:18 +00:00
0de40868b4
loplugin:staticanonymous
...
Change-Id: I1a96ef6bff7a99ab46f7c88722426cba48b46c81
2016-04-01 08:43:14 +02:00
3e48e0ed71
uno/check.cxx: use alignment calculated at runtime instead of hardcode
...
Change-Id: I0f9a48ef01bee4153cd9231bdef4b5a763b6bda2
Reviewed-on: https://gerrit.libreoffice.org/23283
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Stephan Bergmann <sbergman@redhat.com >
2016-03-29 08:28:07 +00:00
449cededd7
android version can also be compiled for x86
...
and x86 has smaller alignment than arm or a x86_64 host,
so needs the MAX_ALIGNMENT_4 to not trigger the static_asserts
Change-Id: I5643a33e4975e7bad20693f99fb8bbd5248c7c1c
2016-03-22 14:44:53 +01:00
d27e3eca2c
tdf#84323: Make osl::Condition::wait more readable
...
It is to improve the readability of calls to osl::Condition::wait.
Change-Id: I5945343c5a7e4729ab599380414d18280bd176fe
Signed-off-by: Gurkaran <gurkran@gmail.com >
Reviewed-on: https://gerrit.libreoffice.org/23417
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Noel Grandin <noelgrandin@gmail.com >
2016-03-22 06:57:20 +00:00
6d42dc0e7c
cppu: SAL_WARN_IF() -> SAL_INFO_IF() where it was dbglevel=2-specific before
...
As these fire already during the build.
Change-Id: I750ea04be317fffb8bc321a2b7b4da0447789c8f
2016-03-11 11:42:04 +01:00
05ff3d112b
Let's use the iterator return by erase method of iterator list
...
and avoid to retrieve list->begin and loop from the first element
Change-Id: I536b7a03c4033b02a7226d25f64764c10c28bdd0
Reviewed-on: https://gerrit.libreoffice.org/23126
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Noel Grandin <noelgrandin@gmail.com >
2016-03-11 07:18:59 +00:00
0cc4e711d3
Remove unnecessary parentheses
...
Change-Id: I6815a02ae8f47c40c3b8cf5692126142de867480
2016-03-10 11:16:10 +01:00
5c4717416b
Fixed minor negation bug in SAL_WARN_IF
...
I corrected the mistake that i did while converting OSL_ENSURE to
SAL_WARN_IF while submitting a patch regarding removing OSL_DEBUG_LEVEL > 1
conditionals. Thanks to Julien Nabet :)
Change-Id: I374373bf151a43b1ababf4c28b509da71068f755
Reviewed-on: https://gerrit.libreoffice.org/23112
Reviewed-by: Stephan Bergmann <sbergman@redhat.com >
Tested-by: Stephan Bergmann <sbergman@redhat.com >
2016-03-10 10:14:03 +00:00
50bf3061e6
typo
...
Change-Id: Id990e76769c3b5e2e048f3faf754efbae2b41c3f
2016-03-09 09:26:37 +01:00
524ae3589c
Use plain assert (to complement use of static_assert above)
...
Change-Id: Id4ac9e86a6af3fa84f7a9680051dfe2564f8c5c5
2016-03-09 09:17:23 +01:00
ea5bc30fbb
Extract static_asserts out of OSL_DEBUG_LEVEL > 0
...
Change-Id: I604b41a5063728833d57e2589e6d3ec39eb67166
2016-03-08 21:37:42 +01:00
4f56db98af
Clean up namespace
...
Change-Id: I8207f7906cb8914b6c272efaf8f136a1bce7e4b0
2016-03-08 21:37:42 +01:00
7024c86b17
Extract checking code to its own check.cxx
...
Change-Id: I9d5b14c374ce62ac7b970faa30c38a5a76568ed4
2016-03-08 21:37:42 +01:00
c94f5b0260
loplugin:cstylecast
...
Change-Id: I3771f84ec94c62988c075dd26ee1de17200af705
2016-03-08 18:16:18 +01:00
c2fe73d6a9
Remove redundant checks (that trigger loplugin:implicitboolconversion])
...
Change-Id: I86c0b56b7d330e3e3450a5806a89ca8fb7a1bfae
2016-03-08 18:15:52 +01:00
05bca56923
tdf#91794: Remove OSL_DEBUG_LEVEL > 1 conditionals
...
Updates pointed by sberg
Change-Id: Ie12548dfa9ad3a6836efbfe64153bc075f138fc6
Reviewed-on: https://gerrit.libreoffice.org/22622
Reviewed-by: Stephan Bergmann <sbergman@redhat.com >
Tested-by: Stephan Bergmann <sbergman@redhat.com >
2016-03-08 16:57:42 +00:00
369b33903a
WaE 0xdeadbeaf 32 bits litteral casting to 64 bits pointer
...
Change-Id: I9769a1d9707cc958329f1c05ccbed780983faf14
Reviewed-on: https://gerrit.libreoffice.org/22600
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Norbert Thiebaud <nthiebaud@gmail.com >
2016-02-22 02:32:13 +00:00
53bf3ea58e
tdf#57950: Replace chained O(U)StringBuffer::append() with operator+
...
Change-Id: Ic76cf0130ebec4cf723b83d82f59ae45bfcb3ea1
Reviewed-on: https://gerrit.libreoffice.org/22350
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Noel Grandin <noelgrandin@gmail.com >
2016-02-15 07:38:21 +00:00
a238b1f8d3
Remove excess newlines
...
A ridiculously fast way of doing this is:
for i in $(pcregrep -l -M -r --include='.*[hc]xx$' \
--exclude-dir=workdir --exclude-dir=instdir '^
{3,}' .)
do
perl -0777 -i -pe 's/^
{3,}/
/gm' $i
done
Change-Id: Iebb93eccbee9e4fc5c4380474ba595858a27ac2c
Reviewed-on: https://gerrit.libreoffice.org/22224
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com >
2016-02-09 08:18:05 +00:00
64d624b651
Fix typos
...
Change-Id: I9a5940027423ff0791fa7da0b79b617412ce6b86
Reviewed-on: https://gerrit.libreoffice.org/21209
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com >
2016-01-10 14:17:20 +00:00
4a8c0d3135
loplugin:implicitboolconversion
...
Change-Id: I2ef26c34a424e653d85597c85baa736c19004313
2016-01-03 17:42:10 -08:00
5e9db55def
cppcheck: allocaCalled
...
Change-Id: I4e2345cdf9fd8d088f3522d563263b65abedb7c9
2016-01-03 20:39:42 +00:00
c6dbbdf851
i125711 - Illumos port: generalize MAX_ALIGNMENT for Solaris
...
GCC in Ilumos appears to behave exactly like the Solaris SUNPRO
compiler so generalize the case for Solaris.
(cherry picked from commit e1da117c49fc02af9543e32526bf1c04657534c4)
Change-Id: I3fa619f34c35608b187c3aa394552ac78c3f0c20
2015-11-25 20:59:45 +00:00
aad80e0b9a
cppcheck:useInitializationList
...
Change-Id: I744ff3e268fbffca9499121f3567640934aaae51
Reviewed-on: https://gerrit.libreoffice.org/20110
Reviewed-by: Noel Grandin <noelgrandin@gmail.com >
Tested-by: Noel Grandin <noelgrandin@gmail.com >
2015-11-22 12:14:53 +00:00
4730b58d99
loplugin:nullptr (automatic rewrite)
...
Change-Id: I17eb40b2923793280ea220e519f97563c8490a19
2015-11-10 10:31:20 +01:00
6a2440ea91
cid#1338241 removed throw from C function.
...
Lower level C++ make a throw, this cannot be passed
back in a C function.
Change-Id: I54ace0284d0291d54f53b8947e9f4ffc2e0a56ab
Reviewed-on: https://gerrit.libreoffice.org/19873
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Norbert Thiebaud <nthiebaud@gmail.com >
2015-11-10 07:21:43 +00:00
5ff684477d
cid#1338242 cid#1338241 removed throw from extern "C" function
...
Encapsulated throw from C++ to a return false in the "C" function
Change-Id: I2fc89b0dcf434395859300b3d3890247d1288295
Reviewed-on: https://gerrit.libreoffice.org/19872
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Norbert Thiebaud <nthiebaud@gmail.com >
2015-11-10 07:21:07 +00:00
6c80a8fe89
new loplugin: oncevar
...
Change-Id: If57390510dde4d166be3141b9f658a7453755d3f
Reviewed-on: https://gerrit.libreoffice.org/19815
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Noel Grandin <noelgrandin@gmail.com >
2015-11-09 08:34:40 +00:00
be729e7721
tdf#94269: Replace "n" prefix for bool variables with "b"
...
Change-Id: I178545792c7354a362658ac7ef8b1d4cf0865797
Signed-off-by: Michael Stahl <mstahl@redhat.com >
2015-11-02 23:40:57 +01:00
f570f837d6
Avoid ASan new-delete-type-mismatch with -fsized-deallocation
...
...where "subclasses" of typelib_TypeDescription are deleted non-
polymorphically
Change-Id: I708d245e12d2e2159e9df60b61d1b37801083651
2015-11-02 10:50:24 +01:00
b36963c0a6
Replace "SAL_OVERRIDE" with "override" in LIBO_INTERNAL_ONLY code
...
Change-Id: I2ea407acd763ef2d7dae2d3b8f32525523ac8274
2015-10-12 17:52:29 +02:00
3f6da86e9f
Fix typos
...
Change-Id: I13c3dc33722f139582f27412d5d336264d3d15a3
Reviewed-on: https://gerrit.libreoffice.org/18942
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de >
Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de >
2015-09-30 13:05:20 +00:00
22b80ac8e2
boost->std
...
Change-Id: I3fd9e1599c5ad812879a58cf1dabbcd393105e1c
Reviewed-on: https://gerrit.libreoffice.org/18564
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Caolán McNamara <caolanm@redhat.com >
Tested-by: Caolán McNamara <caolanm@redhat.com >
2015-09-14 12:54:25 +00:00
b03b8c8c0c
loplugin:stringconstant: OUStringBuffer: appendAscii -> append
...
Change-Id: I22808f7740a9a936deb9160b24fe4634f8613823
2015-08-31 08:04:07 +02:00
2861d5bedc
Some oslCondition -> osl::Condition
...
Change-Id: I86cfbefd1cb8b22fca659a158b8e31d5c991de7a
2015-08-18 08:16:18 +02:00
4712396b3b
loplugin: defaultparams
...
Change-Id: I906912f29448bfc72e8139546aa09525c959867f
2015-08-11 09:48:17 +02:00
171990764e
com::sun::star-css in cppu,cppuhelper
...
Change-Id: I84a412f587fd66f6c0610f083e61cf0fa079d4d9
Reviewed-on: https://gerrit.libreoffice.org/17384
Reviewed-by: Noel Grandin <noelgrandin@gmail.com >
Tested-by: Noel Grandin <noelgrandin@gmail.com >
2015-07-29 06:44:57 +00:00
cbce40e965
Make content of OSL_ASSERT, DBG_ASSERT, etc. visiblie in non-debug builds
...
...to avoid lots of loplugin:staticmethods warnings. Also enables DBG_ASSERT
etc. also for --enable-debug builds in addition to --enable-dbgutil builds.
Change-Id: Ib89ecd9ab8ce7abb2c64790ace248b31f9d2b64d
2015-07-13 18:14:11 +02:00
81275d4725
Avoid loplugin:redundantcast in non-debug build
...
Change-Id: Ib5f57ba5154c56b89ab550aef5a87ee27539ddd9
2015-07-08 20:56:19 +02:00