Commit Graph
552 Commits
Author SHA1 Message Date
Mike Kaganski 2eeac1b51b Deduplicate includes
Change-Id: I16a77d0701b42bcf9d751834f0eae4decedd9176
Reviewed-on: https://gerrit.libreoffice.org/50858
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2018-03-07 10:42:09 +01:00
Andrea Gelmini 4c0735830b Fix typos
Change-Id: Ieef0e3f21eb12cb5b72d39da4bc0a8c60dd0d5ce
Reviewed-on: https://gerrit.libreoffice.org/48545
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Julien Nabet <serval2412@yahoo.fr>
2018-01-25 08:52:34 +01:00
Noel Grandin 920447d4a5 tdf#114952 filep is still used in soltools/mkdepend/parse.c
regression from

    commit 18f5131454
    Date:   Tue Jun 20 19:54:23 2017 +0200
    loplugin:unusedfields store..svl

somewhat tricky to reproduce on linux, I had to do

    make soltools CPPFLAGS=-DDEBUG

Change-Id: I4b1989efc02b9e864432b96cf4f71a29e581bcdb
Reviewed-on: https://gerrit.libreoffice.org/47755
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-01-12 07:01:53 +01:00
Noel Grandin be354a2abd loplugin:constparams
Change-Id: Ia322ecf8f80b28c58ec33d17ca9607401a92534b
Reviewed-on: https://gerrit.libreoffice.org/45959
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-12-07 07:21:32 +01:00
Stephan Bergmann 6f694e9612 loplugin:includeform: soltools (macOS)
Change-Id: I7e2a8d13e068f651bf6e8fbbb66363a4b2b5b0e7
2017-10-24 11:53:57 +02:00
Johnny_M b165910330 Translate German comments and debug strings (leftovers)
Additionally:
- A few grammatical fixes

Change-Id: I15ba3809f6b4746be5a691ec2adc0ea17730fa4a
Reviewed-on: https://gerrit.libreoffice.org/42690
Reviewed-by: Michael Stahl <mstahl@redhat.com>
Tested-by: Michael Stahl <mstahl@redhat.com>
2017-09-25 14:13:13 +02:00
Mike Kaganski afeff9102c Use even more WIN32_LEAN_AND_MEAN
Change-Id: I538fe5b41156366e0e87b3a93e58a3947afd18f5
Reviewed-on: https://gerrit.libreoffice.org/42398
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2017-09-18 01:13:30 +02:00
Noel Grandin 45acf26775 remove some unused macro definitions
Change-Id: I253e5108161b932e3dc588b656e550bb9dc022b0
Reviewed-on: https://gerrit.libreoffice.org/41672
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-08-29 15:19:17 +02:00
Stephan Bergmann dac11d8d50 Make cpp cope with long source lines
under --with-lang=ALL it had started to crash during e.g.

> LD_LIBRARY_PATH=${LD_LIBRARY_PATH:+$LD_LIBRARY_PATH:}".../instdir/program:.../instdir/program" .../workdir/LinkTarget/Executable/cpp -+ -P -DWITH_POSTGRESQL_SDBC -DWITH_FIREBIRD_SDBC -DWITHOUT_EXTENSION_MEDIAWIKI -DWITHOUT_SCRIPTING_BEANSHELL -DWITHOUT_SCRIPTING_JAVASCRIPT -DWITH_HELPPACK_INTEGRATION -DWITH_EXTENSION_INTEGRATION -DENABLE_EXTENSION_UPDATE -DX86_64 -DLINUX -D_PTHREADS -DUNIX -DUNX -DCOMID=gcc3 -D_gcc3 -DWITH_LPSOLVER -I.../scp2/inc -I.../workdir -I.../config_host -I.../workdir/CustomTarget/scp2/macros -I.../workdir/ScpTemplateTarget/scp2/source/templates .../scp2/source/calc/file_calc.scp > .../workdir/ScpPreprocessTarget/scp2/source/calc/file_calc.pre

because of

> Syscall param read(buf) points to unaddressable byte(s)
>    at 0x4F31A80: __read_nocancel (syscall-template.S:84)
>    by 0x404F98: fillbuf (_lex.c:631)
>    by 0x404CCF: gettokens (_lex.c:479)
>    by 0x400F0A: process (_cpp.c:77)
>    by 0x400E80: main (_cpp.c:60)
>  Address 0x5278494 is 0 bytes after a block of size 32,772 alloc'd
>    at 0x4C2DB9D: malloc (vg_replace_malloc.c:299)
>    by 0x402034: domalloc (_cpp.c:321)
>    by 0x40554F: setsource (_lex.c:679)
>    by 0x403E38: doinclude (_include.c:130)
>    by 0x401F9D: control (_cpp.c:297)
>    by 0x401002: process (_cpp.c:101)
>    by 0x400E80: main (_cpp.c:60)

There appears to be no other check that fillbuf doesn't overflow the Source's
input buffer, other than gettokens checking that the buffer isn't more than
three quarters full ("if (ip >= s->inb + (3 * INS / 4)) ...").  That smells like
cpp assumes input lines to be shorter than some maximum number of characters
(like the C99 standard setting a minimum limit of "4095 characters in logical
source lines"), and

> #define README_TXT_ALL_LANG(key, name, ext) \
> 	key (af) = READMETXTFILENAME(name,_af,ext); \
> 	Name (am) = CONFIGLANGFILENAME(name,am,ext); \
> 	Name (ar) = CONFIGLANGFILENAME(name,ar,ext); \
[...]
> 	Name (zh-CN) = CONFIGLANGFILENAME(name,zh-CN,ext); \
> 	Name (zh-TW) = CONFIGLANGFILENAME(name,zh-TW,ext); \
> 	key (zu) = READMETXTFILENAME(name,_zu,ext)

in workdir/CustomTarget/scp2/macros/langmacros.inc (which appears to be the
culprit here) exceeding that limit under --with-lang=ALL.

So just bump the input buffer size.

Change-Id: I5d863050fb772dc7e691a604009ff8702dc718e3
2017-08-21 13:52:47 +02:00
Noel Grandin 0c3bd1d482 new loplugin:droplong
The types 'long' and 'unsigned long' are different sizes on different
platforms, making them wholy unsuitable for portable code.
And when I mean different sizes, I mean 64bit Linux and 64bit Windows
have different bit sizes.

Change-Id: Id4d8cd709bf71a3f85ed6515fae2b0a21ae8c25d
Reviewed-on: https://gerrit.libreoffice.org/41130
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-08-14 09:14:39 +02:00
Christian Barth 88b0711aa5 tdf#39468: Translate some german comments
Change-Id: Ie9062738de26b44394d4c91b31fab99a7777813f
Signed-off-by: Christian Barth <Christian.Barth@zoho.com>
Reviewed-on: https://gerrit.libreoffice.org/40994
Reviewed-by: Michael Stahl <mstahl@redhat.com>
Tested-by: Michael Stahl <mstahl@redhat.com>
2017-08-10 21:40:55 +02:00
Noel Grandin ec340697d6 loplugin:constparams in soltools and various
Change-Id: I5e8e4a9a31aa7c3ff54cc7ce137d08770ea297e1
Reviewed-on: https://gerrit.libreoffice.org/40279
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-21 17:11:15 +02:00
Johnny_M 47b8034efc Translate German comments/debug strings (leftovers in dirs sdext to soltools)
Translates leftovers found using a custom regex and manually checking
the rest of the affected file.

Additionally:
- Translation of someone's attempts at Spanish in the .java file

Change-Id: Ie3a761bc1a8e302247d5dd6e93a6bc4cb3e85a9f
Reviewed-on: https://gerrit.libreoffice.org/39609
Reviewed-by: Michael Stahl <mstahl@redhat.com>
Tested-by: Michael Stahl <mstahl@redhat.com>
2017-07-06 14:35:02 +02:00
Noel Grandin e037381f85 loplugin:unusedfields in slideshow..svtools
Change-Id: I74d5a4b8cfc4b18267f99648a3112b163c91fd8c
Reviewed-on: https://gerrit.libreoffice.org/39474
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-03 16:03:34 +02:00
Noel Grandin 18f5131454 loplugin:unusedfields store..svl
Change-Id: I6070a683e5128271b84a10caccb548d07c950927
Reviewed-on: https://gerrit.libreoffice.org/39021
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-06-21 08:43:05 +02:00
Stephan Bergmann 6291574d94 Remove unused #include <ctype.h>
Change-Id: I8bf3e30687e20151a9e1936e69362abfe9b3a99d
2017-03-23 17:55:31 +01:00
Stephan Bergmann 97a6bf0701 Fix passing plain char into ctype.h is* functions
Change-Id: I4de56462e1fe5bba3035fec691feda91be88b434
2017-03-22 21:58:37 +01:00
Stephan Bergmann 7778d9f51b Prevent calls to rtl/character.hxx functions with (signed) char arguments
...that would implicitly be sign extended (for plain char only if it is signed),
so non-ASCII char values would trigger the isUnicodeCodePoint assert.

Change-Id: Iaf8024ad509e64525558e882fe3fd078cfb4ea91
Reviewed-on: https://gerrit.libreoffice.org/35523
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-03-22 09:00:57 +00:00
dennisroczek 7e24cedb9e fix typo/grammar: "the the" --> the
* also removing pointless ASCII art (tdf#62475)
* truncate ending whitespace in Doxyfile

Change-Id: I59b012f41ac0d170216229da85a49aa41689dee5
Reviewed-on: https://gerrit.libreoffice.org/35151
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-03-19 05:43:51 +00:00
Caolán McNamara 0ea05f930f drop various _MSC_VER < 1900 conditionals
Change-Id: I68d93b260db1f542bb3b44858b61b2d30ae93530
Reviewed-on: https://gerrit.libreoffice.org/34856
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-03-06 09:21:24 +00:00
Stephan Bergmann 23bf422723 -Werror=implicit-fallthrough= (GCC 7)
Change-Id: I2e9ab956fc1e59d09b7409333f18230e34b6a9b7
2017-01-26 15:08:39 +01:00
Stephan Bergmann 62ee434e33 loplugin:externvar
Change-Id: I304144c0ae6b51656ad326a77e9402cc34d5aa18
2017-01-09 20:19:22 +01:00
Gökhan Gurbetoğlu 9b9e5cfd2f tdf#99589 - tolower / toupper - dangerous to Turks ...
Change-Id: I8b0fe9354232a7b60f3605fa6f90f6741f7bf683
Reviewed-on: https://gerrit.libreoffice.org/26537
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: jan iversen <jani@documentfoundation.org>
2016-06-23 09:59:49 +00:00
Pedro Giffuni 429a15cc29 Drop redundant parenthesis.
Found with coccinelle:	http://coccinelle.lip6.fr/

Currently only applied to C code.

(cherry picked from commit aaf15142bcbc44f0e06a3357d2b21ecf9c673d21)

Change-Id: I7d43b024752ebd47e84e2e51028f8fd132410800
2016-04-10 20:40:32 +01:00
Stephan Bergmann 7605a78654 Avoid reserved identifier
Change-Id: I3df7e42b69e3900eae8d10d28a97d776fabd9f4b
2016-03-10 18:32:06 +01:00
Stephan Bergmann 5318e60b12 Avoid reserved identifiers
Change-Id: Ifa0efa673cd60eb7bd668b72b4550da6025ffd1e
2016-03-10 18:32:06 +01:00
Stephan Bergmann c665a1bc0f -Werror,-Wundef
For MSVC/clang-cl: "__STDC__: Indicates conformance with the ANSI/ISO C99
tandard. Defined as the integer literal constant 1 only if the /Za compiler
option is given and you are not compiling C++ code; otherwise is undefined."
(<https://msdn.microsoft.com/en-us/library/b0084kay.aspx>)

Presumably fine to just replace #if with #ifdef here (as is used in all the
other cases surrounding it), and not care whether it actually expands to true.

Change-Id: Ie58c76d7e72321b06a11a370fd28221e85fcf871
2016-03-04 08:54:46 +01:00
Stephan Bergmann cd8e720b06 -Werror,-Wunused-macros
Whatever those _POSIX_ for _MSV_VER were supposed to be good for (have been in
there at least ever since 4f4b74153d "Moved cpp
from cpp to soltools"), but cause -Wunused-macros at least when building with
clang-cl.

Change-Id: I356bf663cd1e86298ba72a179f46bb9d0c10016b
2016-03-04 08:52:43 +01:00
Noel Grandin c45d3badc9 new loplugin: commaoperator
Change-Id: I03f24e61f696b7619855e3c7010aa0d874e5a4ff
2016-02-23 08:08:56 +02:00
Noel Grandin 2087484c65 use consistent #define checks for the Windows platform
stage 2 of replacing usage of various checks for the windows platform
with the compiler-defined '_WIN32' macro

In this stage we focus on replacing usage of the WIN macro

Change-Id: Ie8a4a63198a6de96bd158ecd707dadafb9c8ea84
Reviewed-on: https://gerrit.libreoffice.org/22393
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-02-17 11:33:57 +00:00
Noel Grandin ce43d0ae92 use consistent #define checks for the Windows platform
stage 1 of replacing usage of various checks for the windows platform
with the compiler-defined '_WIN32' macro

Change-Id: Iece73abdee530937e0737190b1aa97a46cd3075f
Reviewed-on: https://gerrit.libreoffice.org/22390
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Stahl <mstahl@redhat.com>
2016-02-16 10:37:55 +00:00
Stephan Bergmann d48e054250 -Werror,-Wunused-parameter (clang-cl)
Change-Id: I1ac58714e04b995ef5229888f0c427104c001318
2016-01-26 17:06:41 +01:00
Andrea Gelmini 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
Noel Grandin a07fc5bc15 loplugin:unusedfields in soltools/
Change-Id: I895a487b4c7be27fe81a2c4c122adb2aba37c638
2015-11-23 13:30:54 +02:00
Stephan Bergmann 103d1f4486 loplugin:nullptr (automatic rewrite; Mac-specific code)
Change-Id: Ib52f7fb846886dd970ddd51475f890cd81c8f2b5
2015-11-10 16:20:39 +01:00
Stephan Bergmann 2ee689b56a loplugin:nullptr (automatic rewrite)
Change-Id: I3ae78d781e686bfe9b0513183da7fc8edd81024b
2015-11-10 10:31:40 +01:00
Noel Grandin d68a0fc050 loplugin:unusedmethods
Change-Id: Ie1603adf3908fd0668bcbe8f75c6bafa0d0bfd6c
Reviewed-on: https://gerrit.libreoffice.org/19072
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-10-02 06:20:35 +00:00
Andrea Gelmini f45ac62a20 Fix typos
Change-Id: I89ff6d31662824d83961d6457b82db8d8031168c
Reviewed-on: https://gerrit.libreoffice.org/18977
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2015-09-30 10:34:17 +00:00
Andrea Gelmini 0b7d51df3b Fix typos
Change-Id: Ic6415423f46aaee7ba90239a617c318cf92ae222
Reviewed-on: https://gerrit.libreoffice.org/16711
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Samuel Mehrbrodt <s.mehrbrodt@gmail.com>
2015-07-04 10:21:01 +00:00
Stephan Bergmann 6149c5c835 -fsanitize=nonnull-attribute
Change-Id: Id214fb1f0decd4d39684a846c06ff97d8baa209d
2015-06-16 12:24:01 +02:00
Noel Grandin aa1b911b64 loplugin:staticmethods
Change-Id: I1f6c6d13697aa397067478d6b07429120106e6bd
2015-04-02 09:38:29 +02:00
Caolán McNamara aaaa7953f5 V804: Decreased performance
Change-Id: I6430442cc407e02810d849cf60833abe7c7d2830
2015-03-02 11:04:37 +00:00
Noel Grandin ba233e87ef remove unnecessary parenthesis in return statements
found with
$ git grep -lP 'return\s*\(\s*\w+\s*\)\s*;'

Change-Id: Ic51606877a9edcadeb647c5bf17bc928b69ab60e
2015-02-23 09:26:58 +02:00
Noel Grandin 45ec1d9b56 brute-force find-and-remove of unused #define constants.
Change-Id: I7223530ae37297a76654cd00cc1fedb56dbe3adb
2015-01-08 10:39:36 +02:00
Stephan Bergmann b5e9d7e834 warning C4267: conversion from 'size_t' to 'int' (MSVC 64-bit)
Change-Id: Ife7d223f5e751e246c537561d3ce24395b4c9f3b
2014-12-09 10:38:41 +01:00
Stephan Bergmann 7e12a6cccb warning C4267: conversion from 'size_t' to 'int' (MSVC 64-bit)
Change-Id: I2fa40ebe467a65b0d6023883a14c79ff4303bb2f
2014-12-09 10:24:09 +01:00
Caolán McNamara 7b0f4dc514 coverity#1000834 Use of untrusted string value
and

coverity#706196 Use of untrusted string value
coverity#1244947 Use of untrusted string value

Change-Id: I5083aba2eff9e852a24513db431585922302b279
2014-11-06 14:48:02 +00:00
Caolán McNamara 316ac78e78 coverity#982185 silence Unchecked return value from library
and

coverity#982184 Unchecked return value from library

Change-Id: I4b4ba39abc4c008b68cfc1498ee56ac9c4934c98
2014-10-28 10:31:28 +00:00
Norbert Thiebaud 9b401751a8 coverity#706158 Copy into fixed size buffer
Change-Id: I5d540e6e3a21b0563febb70696882439a10b9b86
2014-10-04 08:58:12 -05:00
Caolán McNamara 9e8701c711 coverity#1233618 Overlapping buffer in memory copy
Change-Id: I062dd96bfc4abf2bdaec2c17d1cf57d853d655d8
2014-10-02 14:49:10 +01:00