summaryrefslogtreecommitdiff
path: root/soltools
AgeCommit message (Collapse)AuthorFilesLines
2019-11-06loplugin:indentation find broken if statementsNoel Grandin2-3/+3
so I don't read the "then" block as being a sequential statements Change-Id: Ib2004acd3518bd4ebd2246f02a26c2c0a8bbab4c Reviewed-on: https://gerrit.libreoffice.org/82069 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-10-28add some __attribute__ ((formatNoel Grandin1-0/+9
found by -Wsuggest-attribute=format Change-Id: Ib4430805ddebf4d90e07a3f9d06fd6d832c244a4 Reviewed-on: https://gerrit.libreoffice.org/81582 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-10-21Avoid -fsanitize=nullptr-with-offsetStephan Bergmann1-1/+2
(new with recent Clang 10 trunk) during e.g. InstallModule_scp2/ooo: > [SPP] scp2/source/ooo/common_brand > soltools/cpp/_tokens.c:336:13: runtime error: applying zero offset to null pointer > #0 in copytokenrow at soltools/cpp/_tokens.c:336:13 > #1 in expand at soltools/cpp/_macro.c:325:5 > #2 in expandrow at soltools/cpp/_macro.c:292:13 > #3 in process at soltools/cpp/_cpp.c:106:17 > #4 in main at soltools/cpp/_cpp.c:60:5 Change-Id: Icbe1c105fbd0ff634f3e2966c27af1b89398be13 Reviewed-on: https://gerrit.libreoffice.org/81187 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-09-12gcc9.2.1 also warns about truncation hereNoel Grandin1-3/+3
Change-Id: I8d1cbe259836a9737297a9af0bc762e88ef6148c Reviewed-on: https://gerrit.libreoffice.org/78817 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-09-01Fix '..'Andrea Gelmini1-2/+2
To complete this: https://gerrit.libreoffice.org/#/c/78312/ This is a massive replace for lines ending with ".." instead of "..." It passed "make check" on Linux. Change-Id: I07fa7b2e30ba9ea17a1f9a5e21c57216ba958efe Reviewed-on: https://gerrit.libreoffice.org/78356 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Jenkins
2019-08-12Fix typosAndrea Gelmini1-1/+1
Change-Id: Ia44a9dd214b5b09ed6f9c39b8057c41ae03897f1 Reviewed-on: https://gerrit.libreoffice.org/77285 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2019-07-24cid#1448523 silence bogus Out-of-bounds readCaolán McNamara4-0/+10
Change-Id: I0911133287ace66454e741f7ea994f191d06931c Reviewed-on: https://gerrit.libreoffice.org/76232 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-07-19cid#1448249 Identical code for different branchesCaolán McNamara1-1/+0
Change-Id: Ie34ff807eae5b058f2c234f42010931263859b35 Reviewed-on: https://gerrit.libreoffice.org/75906 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-04-29Fix conditional around closing #pragma GCC diagnostic popStephan Bergmann1-1/+1
...which 7cf3574ac9208e70c03eeaca2def0235ec90f55f "Avoid -Werror=format/stringop-truncation" had failed to adapt Change-Id: Ide00c8136db27519c2d694576910c423d40d481e Reviewed-on: https://gerrit.libreoffice.org/71521 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-04-29Avoid -Werror=format/stringop-truncationJulien Nabet1-1/+1
It also affects gcc 8.3 Change-Id: I896e84d5e1e96abfe81294e921cfcc060e44fb6f Reviewed-on: https://gerrit.libreoffice.org/71474 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-04-01tdf#120703 PVS: Silence V522 warningsMike Kaganski1-0/+2
V522 There might be dereferencing of a potential null pointer. Change-Id: Ie617b41a8f8d334022cf5313b242a236baedba48 Reviewed-on: https://gerrit.libreoffice.org/70017 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2019-03-31tdf#120703 PVS: Silence V575 warningsMike Kaganski1-1/+3
V575 The potential null pointer is passed into 'foo' function Add asserts to those cases that are related to OOM cases. There's nothing to be done if the assertions fail anyway. Change-Id: I92ac95d44f512aa1948b1552b0e1f6da695a9f92 Reviewed-on: https://gerrit.libreoffice.org/70008 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2019-03-15loplugin:typedefparamStephan Bergmann1-1/+1
Change-Id: Id694376160986b74ef2bf6cacdd96c13669d5c32 Reviewed-on: https://gerrit.libreoffice.org/69291 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-02-11new loplugin writeonlyvarsNoel Grandin2-9/+2
largely based on the relevant portion of the unusedfields loplugin, but adapted for local vars Change-Id: Ic522a941573940e8f75c88f90ba5f37508ca49b1 Reviewed-on: https://gerrit.libreoffice.org/66835 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-02-10loplugin:indentation in soltools..svlNoel Grandin3-5/+5
Change-Id: I270a12cdb68920b8fa23b82dd933724e30334485 Reviewed-on: https://gerrit.libreoffice.org/67565 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-02-06loplugin:flatten in soltoolsNoel Grandin2-27/+27
Change-Id: I3df754c58c90978ef5fccc90518ad1af92516a9e Reviewed-on: https://gerrit.libreoffice.org/67404 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-12-05loplugin:unnecessaryparen include more assignmentsNoel Grandin1-1/+1
Change-Id: I9fb8366634b31230b732dd38a98f800075529714 Reviewed-on: https://gerrit.libreoffice.org/64510 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-12-01tdf#120703 PVS: V560 A part of conditional expression is always true/falseMike Kaganski1-1/+1
Change-Id: I38f3e3243f8cb891c9a0fe2f4c68bc76acd1ef44 Reviewed-on: https://gerrit.libreoffice.org/64020 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2018-11-30loplugin:singlevalfieldsNoel Grandin2-8/+4
Change-Id: I70dc861573fd1b3d799c88aa2a6d9a3eda0e2a43 Reviewed-on: https://gerrit.libreoffice.org/64327 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-11-29Rename Mac OS X to official name macOS in comments and documentationBartosz Kosiorek1-1/+1
Change-Id: I651b7f202fa52ff5f5357a11aa72c43eb7dc7f95 Reviewed-on: https://gerrit.libreoffice.org/64102 Tested-by: Jenkins Reviewed-by: Bartosz Kosiorek <gang65@poczta.onet.pl>
2018-11-26file param is used in DEBUG modeNoel Grandin1-4/+6
regression from commit 4c19552052083b9b10d581f1a93f6ddecf241bcd remove some unused enum values and defines in soltools Change-Id: I897a75a65ab31068dbb9c51b111c81ab848506c9 Reviewed-on: https://gerrit.libreoffice.org/64018 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-11-22remove some unused enum values and defines in soltoolsNoel Grandin3-211/+6
which led to a whole bunch of dead code Change-Id: If138a05cf7f09b3020e27489b90c32776b859bcf Reviewed-on: https://gerrit.libreoffice.org/63751 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-11-22remove unused toktype::IDENTNoel Grandin1-1/+1
Change-Id: I4222902d9ef93e92dfbcbd089d6aaf7d724fa0de Reviewed-on: https://gerrit.libreoffice.org/63750 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-11-16loplugin:buriedassign in sd..writerfilterNoel Grandin1-2/+4
Change-Id: I954c12d9e1c493be6ac8c7b15076077b5bff5b74 Reviewed-on: https://gerrit.libreoffice.org/62811 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-11-08Silence GCC 8.2.1 -Werror=format-truncation=Stephan Bergmann1-0/+8
After 09841225fc055f8270cee3059253f923dd544797 "soltools: fix -Werror=format-overflow" changed the sprintf into an snprintf, at least the Fedora 29 "gcc (GCC) 8.2.1 20181011 (Red Hat 8.2.1-4)" now complains about > [C ] soltools/mkdepend/include.c > soltools/mkdepend/include.c: In function ‘remove_dotdot.constprop’: > soltools/mkdepend/include.c:246:42: error: ‘snprintf’ output may be truncated before the last format character [-Werror=format-truncation=] > int n = snprintf(buf, BUFSIZ, "%s%s%s", dir, *dir ? "/" : "", component); > ^ > soltools/mkdepend/include.c:246:13: note: ‘snprintf’ output 1 or more bytes (assuming 8193) into a destination of size 8192 > int n = snprintf(buf, BUFSIZ, "%s%s%s", dir, *dir ? "/" : "", component); > ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ This all looks not very helpful, lets limit the silencing to just GCC 8.2 (in the hopes that later versions of GCC won't emit that warning any more, anyway). Change-Id: I006964e4f32bbb52b6b90288e2d623797b8d38ea Reviewed-on: https://gerrit.libreoffice.org/63068 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-11-07loplugin:collapseif in sdext..svxNoel Grandin1-5/+2
Change-Id: I188d9e9b53e00acfbae3c7acd54de28f084c4b3f Reviewed-on: https://gerrit.libreoffice.org/62985 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-10-22loplugin:staticvar in soltools..svxNoel Grandin3-5/+5
Change-Id: Ie9f36eb0e00aaee34a27f136ed903f8f87e52dcc Reviewed-on: https://gerrit.libreoffice.org/61916 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-10-18clang-tidy readability-simplify-boolean-exprNoel Grandin1-5/+1
Change-Id: I78fa01a6c803dec782488490b730af3a11814d64 Reviewed-on: https://gerrit.libreoffice.org/61902 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-10-09loplugin:constfields in smoketest..sotNoel Grandin3-7/+7
Change-Id: I59ceda8ff85cc7b348882a6e1c62491b74297801 Reviewed-on: https://gerrit.libreoffice.org/61549 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-10-05soltools: fix -Werror=format-overflowMichael Stahl1-1/+4
error: ‘sprintf’ may write a terminating nul past the end of the destination (Why does GCC8 complain about this now and not before?) Change-Id: I62cd9dec02d313b5aff1afc4cadf38ca1909ffb1 Reviewed-on: https://gerrit.libreoffice.org/61381 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2018-10-04Avoid -Werror=stringop-truncationStephan Bergmann1-1/+1
... "‘strncpy’ output truncated before terminating nul copying as many bytes from a string as its length", as reported at <https://lists.freedesktop.org/archives/libreoffice/2018-October/081109.html> "LO build fails -Werror=stringop-truncation in _lex.c". Not adding the terminating NUL appears to be intentional here, as the s->inp buffer is terminated (through s->inl) with EOB bytes after the if/else blocks. Change-Id: I5a8559e620b7e34ee27cbcd0f836432deb8cba90 Reviewed-on: https://gerrit.libreoffice.org/61355 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-09-24-Werror,-Wunused-variable (clang-cl)Stephan Bergmann1-1/+2
Change-Id: I4132e02ce9a4eb509a2e70a705068102f95ffd3e Reviewed-on: https://gerrit.libreoffice.org/60937 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-09-18loplugin:external (in non-Linux code)Stephan Bergmann1-1/+1
Change-Id: I8cd9d278cfa9da9ceaab364a549d0e2c92d4be09 Reviewed-on: https://gerrit.libreoffice.org/60664 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-09-17loplugin:external in Executable_mkdependStephan Bergmann5-23/+22
...moving notdotdot to include.c (and some other decls to def.h) Change-Id: I5d05988aca3daed978c2302380f69d1373081571 Reviewed-on: https://gerrit.libreoffice.org/60537 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-09-16loplugin:external in Executable_cppStephan Bergmann4-10/+8
...showing that tottok and tokkind are actually unused Change-Id: Ic70f4f1fd7b585b00e98b538d116599e395a43b9 Reviewed-on: https://gerrit.libreoffice.org/60536 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-07-27Related: rhbz#1602589 silence leaked_storageCaolán McNamara2-0/+2
Change-Id: Ib489ebf55d3a18d2af6f34b3f6128231d6d7758c Reviewed-on: https://gerrit.libreoffice.org/58090 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-05-27Fix typosAndrea Gelmini1-1/+1
Change-Id: I4924e62af79ba225a4cc9ed2f1221111854318b9 Reviewed-on: https://gerrit.libreoffice.org/54883 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2018-05-27Fix typosAndrea Gelmini1-1/+1
Change-Id: I907e5dbcd7c62344c2c76fe2fdaf1b18ecfecee1 Reviewed-on: https://gerrit.libreoffice.org/54838 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2018-03-07Deduplicate includesMike Kaganski1-1/+0
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-01-25Fix typosAndrea Gelmini1-1/+1
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-12tdf#114952 filep is still used in soltools/mkdepend/parse.cNoel Grandin1-5/+5
regression from commit 18f513145477d4621290253d936dad7a40ee4c05 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>
2017-12-07loplugin:constparamsNoel Grandin2-3/+3
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-10-24loplugin:includeform: soltools (macOS)Stephan Bergmann2-2/+2
Change-Id: I7e2a8d13e068f651bf6e8fbbb66363a4b2b5b0e7
2017-09-25Translate German comments and debug strings (leftovers)Johnny_M1-2/+2
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-18Use even more WIN32_LEAN_AND_MEANMike Kaganski1-0/+3
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-08-29remove some unused macro definitionsNoel Grandin1-5/+0
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-21Make cpp cope with long source linesStephan Bergmann1-1/+1
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-14new loplugin:droplongNoel Grandin2-4/+4
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-10tdf#39468: Translate some german commentsChristian Barth1-1/+2
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-07-21loplugin:constparams in soltools and variousNoel Grandin12-38/+38
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>