summaryrefslogtreecommitdiff
path: root/soltools/cpp
AgeCommit message (Collapse)AuthorFilesLines
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-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-10loplugin:indentation in soltools..svlNoel Grandin2-4/+4
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 Grandin1-14/+14
Change-Id: I3df754c58c90978ef5fccc90518ad1af92516a9e Reviewed-on: https://gerrit.libreoffice.org/67404 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-22remove some unused enum values and defines in soltoolsNoel Grandin1-1/+1
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-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-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-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-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-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 McNamara1-0/+1
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-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>
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-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 Grandin1-3/+3
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 Grandin6-16/+16
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-06Translate German comments/debug strings (leftovers in dirs sdext to soltools)Johnny_M1-5/+4
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-03loplugin:unusedfields in slideshow..svtoolsNoel Grandin7-11/+7
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-03-22Fix passing plain char into ctype.h is* functionsStephan Bergmann1-1/+1
Change-Id: I4de56462e1fe5bba3035fec691feda91be88b434
2017-03-19fix typo/grammar: "the the" --> thedennisroczek1-1/+1
* 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-01-26-Werror=implicit-fallthrough= (GCC 7)Stephan Bergmann2-1/+3
Change-Id: I2e9ab956fc1e59d09b7409333f18230e34b6a9b7
2017-01-09loplugin:externvarStephan Bergmann5-5/+7
Change-Id: I304144c0ae6b51656ad326a77e9402cc34d5aa18
2016-03-04-Werror,-Wunused-macrosStephan Bergmann2-6/+0
Whatever those _POSIX_ for _MSV_VER were supposed to be good for (have been in there at least ever since 4f4b74153d27a9579c49b225b2690e7f9416fe78 "Moved cpp from cpp to soltools"), but cause -Wunused-macros at least when building with clang-cl. Change-Id: I356bf663cd1e86298ba72a179f46bb9d0c10016b
2016-02-17use consistent #define checks for the Windows platformNoel Grandin1-2/+2
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-01-10Fix typosAndrea Gelmini2-2/+2
Change-Id: I9a5940027423ff0791fa7da0b79b617412ce6b86 Reviewed-on: https://gerrit.libreoffice.org/21209 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
2015-11-10loplugin:nullptr (automatic rewrite; Mac-specific code)Stephan Bergmann1-2/+2
Change-Id: Ib52f7fb846886dd970ddd51475f890cd81c8f2b5
2015-11-10loplugin:nullptr (automatic rewrite)Stephan Bergmann3-7/+7
Change-Id: I3ae78d781e686bfe9b0513183da7fc8edd81024b
2015-10-02loplugin:unusedmethodsNoel Grandin1-1/+0
Change-Id: Ie1603adf3908fd0668bcbe8f75c6bafa0d0bfd6c Reviewed-on: https://gerrit.libreoffice.org/19072 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-09-30Fix typosAndrea Gelmini2-9/+7
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-07-04Fix typosAndrea Gelmini3-3/+3
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-06-16-fsanitize=nonnull-attributeStephan Bergmann1-1/+2
Change-Id: Id214fb1f0decd4d39684a846c06ff97d8baa209d
2014-11-06coverity#1000834 Use of untrusted string valueCaolán McNamara1-0/+1
and coverity#706196 Use of untrusted string value coverity#1244947 Use of untrusted string value Change-Id: I5083aba2eff9e852a24513db431585922302b279
2014-10-02coverity#1233618 Overlapping buffer in memory copyCaolán McNamara1-1/+1
Change-Id: I062dd96bfc4abf2bdaec2c17d1cf57d853d655d8
2014-06-24remove use of register keyword in C filesNoel Grandin2-5/+5
C compilers have been ignoring it for the last decade Change-Id: I42918263121dd189bab9d27077798b779b9e8da1 Reviewed-on: https://gerrit.libreoffice.org/9873 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2014-05-30coverity#705235 Missing break in switchCaolán McNamara1-0/+1
Change-Id: I19e8e6aa08dc879f273f2a0177b40435c0ac553d
2014-05-22Fix some memory leak in soltools/cpp toolStephan Bergmann2-0/+2
...though many more remain, as the design appears to be let heap grow until exit. Change-Id: I3e5cc95a0896c8add33a767209ab0ff60d6a4b52
2014-05-15Resolves fdo#70681: fixincludeguards.pl: all that's leftThomas Arnhold1-2/+2
Change-Id: I3e51a62710bb46c8255fd228d41d9300c90a1fb5 Reviewed-on: https://gerrit.libreoffice.org/9360 Reviewed-by: Thomas Arnhold <thomas@arnhold.org> Tested-by: Thomas Arnhold <thomas@arnhold.org>
2014-04-10Clean up function declarationStephan Bergmann3-3/+32
Change-Id: I92c54f61fe8608d788cc236956f4a5a58e20a7df
2014-04-04Move prototype to includeStephan Bergmann2-2/+2
Change-Id: I90c093c704609429f9997f3ffed6a9a79c8956a6
2014-03-31Typo #elsif -> #elifStephan Bergmann1-6/+6
Change-Id: I95d4dc2a3364172e8917d0a029564e9114943148
2013-11-17WaE: 'PATH_MAX' : macro redefinitionTor Lillqvist2-2/+6
Change-Id: I153e34d24493bbbebf37422fb6382969153506a8
2013-11-16Fix for VS 2013 compilationJesús Corrius2-2/+2
I don´t know why it doesn´t work anymore, but the fix is trivial may be related of using the Windows 8.0 SDK. Change-Id: Ia09109b53d4f022a732ea781c98ddd4eb0c721d9
2013-08-22left shift of 1 by 31 places cannot be represented in type 'int'Stephan Bergmann1-2/+2
Clang -fsanitize=undefined Change-Id: I2b3f1bd28e098d5eb57892d2c7438c18c5c3b357
2013-08-21We don't seem to actually need glibc getoptTor Lillqvist1-2/+2
Change-Id: I1f221533f5ea684d113bdc45c04bf84405140f9f Reviewed-on: https://gerrit.libreoffice.org/5539 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>