32 Commits
Author SHA1 Message Date
Stephan Bergmann 707449adc9 -Werror,-Wdeprecated-declarations (sprintf, macOS 13 SDK): soltools
These occurrences of sprintf in C code don't normally trigger the deprecation
warning at least with recent macOS, because macOS by default now enables
_FORTIFY_SOURCE (see the code setting it in
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.0.sdk/usr/include/_types.h
when originally unset), which for C code hides the declaration of sprintf (along
with its deprecation annotation) in
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.0.sdk/usr/include/stdio.h
with a macro (expanding to __builtin___sprintf_chk) in
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.0.sdk/usr/include/secure/_stdio.h.
But they started to trigger when I did an experimental -fsanitize=address build,
because
<https://github.com/llvm/llvm-project/commit/b4f819086a61b5a843f0171a7467c5184ba1b086>
"Disable source fortification on Darwin with AddressSanitizer" predefines
-D_FORTIFY_SOURCE=0 in that case.

While there might be ways to clean this code up to use something better than the
deprecated sprintf, don't bother too much with this 3rd-party, build-time--only
code and just silence any potential deprecation warnings.

Change-Id: I9f223a0ad50b2729b5d9af2db588fe9f82d0b07f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142534
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-11-10 14:50:53 +01:00
Noel Grandin 283a9790bf loplugin:indentation check for indent inside block
look for places where the statements inside a block are
not indented

Change-Id: I0cbfa7e0b6fb194b2aff6fa7e070fb907d70ca2f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123885
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-10-20 15:39:38 +02:00
Noel Grandin 7b99cdb2d7 loplugin:indentation find broken if statements
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-11-06 06:27:51 +01:00
Noel Grandin 74c409853f gcc9.2.1 also warns about truncation here
Change-Id: I8d1cbe259836a9737297a9af0bc762e88ef6148c
Reviewed-on: https://gerrit.libreoffice.org/78817
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-09-12 11:05:19 +02:00
Stephan Bergmann df5d1e47c3 Fix conditional around closing #pragma GCC diagnostic pop
...which 7cf3574ac9 "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-29 14:27:56 +02:00
Julien Nabet 7cf3574ac9 Avoid -Werror=format/stringop-truncation
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-29 09:11:26 +02:00
Noel Grandin e4472d3c13 loplugin:unnecessaryparen include more assignments
Change-Id: I9fb8366634b31230b732dd38a98f800075529714
Reviewed-on: https://gerrit.libreoffice.org/64510
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-12-05 07:49:30 +01:00
Noel Grandin 14b366e57a loplugin:singlevalfields
Change-Id: I70dc861573fd1b3d799c88aa2a6d9a3eda0e2a43
Reviewed-on: https://gerrit.libreoffice.org/64327
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-11-30 12:18:04 +01:00
Stephan Bergmann f0f1ae6e9f Silence GCC 8.2.1 -Werror=format-truncation=
After 09841225fc "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-08 12:19:30 +01:00
Michael Stahl 09841225fc soltools: fix -Werror=format-overflow
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-05 07:12:59 +02:00
Stephan Bergmann ec709a8d5e -Werror,-Wunused-variable (clang-cl)
Change-Id: I4132e02ce9a4eb509a2e70a705068102f95ffd3e
Reviewed-on: https://gerrit.libreoffice.org/60937
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-09-24 16:47:40 +02:00
Stephan Bergmann ffe2b51a49 loplugin:external in Executable_mkdepend
...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-17 07:30:56 +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
Stephan Bergmann 62ee434e33 loplugin:externvar
Change-Id: I304144c0ae6b51656ad326a77e9402cc34d5aa18
2017-01-09 20:19:22 +01:00
Stephan Bergmann d48e054250 -Werror,-Wunused-parameter (clang-cl)
Change-Id: I1ac58714e04b995ef5229888f0c427104c001318
2016-01-26 17:06:41 +01: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
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
Norbert Thiebaud 9b401751a8 coverity#706158 Copy into fixed size buffer
Change-Id: I5d540e6e3a21b0563febb70696882439a10b9b86
2014-10-04 08:58:12 -05:00
Noel Grandin 0a0c70e05a mkdepend: cleanup indentation and function declarations
to make it easier to read

Change-Id: Iff0fe055c12358edc1be335ec83d0855cc32f03c
Reviewed-on: https://gerrit.libreoffice.org/9877
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2014-06-24 15:30:53 +00:00
Noel Grandin 290b7e0632 remove use of register keyword in C files
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-06-24 15:30:16 +00:00
Stephan Bergmann a15715c343 -Wstrict-prototypes
...no reason to not have it enabled for URE C include files and what
little real C code is still left.  (But note that Clang ignores that
warning.)

Change-Id: Ia6940f9f940a0c226e9b724331d65c9862ce32e6
2014-06-17 15:51:54 +02:00
Stephan Bergmann b6ba12c729 Prevent clang errors about promoted type incompatibilities of K&R function parameters. 2011-10-17 23:16:58 +02:00
Michael Meeks c6709a7b64 hush unused parameter error 2011-04-26 14:57:14 +01:00
Norbert Thiebaud f0e5895d5b Merge commit 'ooo/DEV300_m101' into integration/dev300_m101
* commit 'ooo/DEV300_m101': (500 commits)
  masterfix DEV300: #i10000# remove hard dep
  masterfix DEV300: #i10000# usage of L10N build_type
  masterfix DEV300: #i10000# usage of L10N build_type
  masterfix DEV300: #i100000# dep. fix
  masterfix DEV300: #i10000# removed one hard dep
  masterfix DEV300: #i10000# fixed patch handling
  masterfix DEV300: #i10000# new configure
  DEV300
  masterfix DEV300: #i10000# nawk -> awk
  l10nmove: adjust repository handling
  l10nmove: fixed regex
  l10nmove: minor fixes
  l10nmove: add l10n repo to gb_REPOS
  DEV300 masterfix: gnumake3: subsequenttests requires  in environment
  ab80: Adding changes of cws mib21, ab77, ab77run2, dr77i to dev300
  DEV300 masterfix: #i10000#: windows: more bizare hacks ...
  locales34: have a matching configure as well
  DEV300
  locales34: back out change from autoreconf
  gnumake3: JunitTest.mk: bizarre hacks to make it work on windows
  ...

Conflicts:
	configure
	configure.in
	instsetoo_native/prj/build.lst
	instsetoo_native/util/makefile.mk
	instsetoo_native/util/openoffice.lst
	instsetoo_native/util/pack.lst
	ooo.lst
	scp2/source/canvas/canvascommons.scp
	scp2/source/canvas/mtfrenderer.scp
	scp2/source/ooo/common_brand.scp
	scp2/source/ooo/directory_ooo.scp
	scp2/source/ooo/file_library_ooo.scp
	scp2/source/ooo/file_ooo.scp
	scp2/source/ooo/makefile.mk
	scp2/source/ooo/module_hidden_ooo.scp
	scp2/source/ooo/module_langpack.ulf
	scp2/source/ooo/ure.scp
	scp2/source/python/file_python.scp
	scp2/source/sdkoo/sdkoo.scp
	scp2/source/templates/module_langpack_accessories_templates.sct
	scp2/source/templates/module_langpack_accessories_templates_root.sct
	set_soenv.in
	soldep/bootstrp/appdef.cxx
	soldep/bootstrp/dep.cxx
	soldep/bootstrp/hashtbl.cxx
	soldep/bootstrp/makefile.mk
	soldep/bootstrp/minormk.cxx
	soldep/bootstrp/prj.cxx
	soldep/bootstrp/prodmap.cxx
	soldep/inc/dep.hxx
	soldep/inc/minormk.hxx
	soldep/inc/prodmap.hxx
	soldep/inc/soldep/appdef.hxx
	soldep/inc/soldep/connctr.hxx
	soldep/inc/soldep/depper.hxx
	soldep/inc/soldep/depwin.hxx
	soldep/inc/soldep/hashtbl.hxx
	soldep/inc/soldep/objwin.hxx
	soldep/inc/soldep/prj.hxx
	soldep/inc/soldep/sdtresid.hxx
	soldep/inc/soldep/soldep.hxx
	soldep/inc/soldep/soldlg.hxx
	soldep/inc/soldep/tbox.hxx
	soldep/prj/d.lst
	soldep/source/connctr.cxx
	soldep/source/depapp.hxx
	soldep/source/depper.cxx
	soldep/source/depwin.cxx
	soldep/source/makefile.mk
	soldep/source/objwin.cxx
	soldep/source/soldep.cxx
	soldep/source/soldlg.cxx
	soldep/source/soldlg.src
	soldep/source/tbox.cxx
	solenv/bin/build.pl
	solenv/bin/cws.pl
	solenv/bin/make_installer.pl
	solenv/bin/mhids.pl
	solenv/bin/modules/CwsConfig.pm
	solenv/bin/modules/RepositoryHelper.pm
	solenv/bin/modules/installer/regmerge.pm
	solenv/bin/modules/installer/scriptitems.pm
	solenv/bin/modules/installer/servicesfile.pm
	solenv/bin/modules/installer/simplepackage.pm
	solenv/bin/modules/installer/substfilenamefiles.pm
	solenv/config/ssolar.cmn
	solenv/inc/_tg_rslb.mk
	solenv/inc/extension_post.mk
	solenv/inc/libs.mk
	solenv/inc/minor.mk
	solenv/inc/postset.mk
	solenv/inc/settings.mk
	solenv/inc/tg_rslb.mk
	solenv/inc/unxlng.mk
	solenv/inc/wntmsc.mk
	soltools/HIDCompiler/hidclex.l
	stlport/prj/d.lst
	stlport/systemstlguards/postextstl.h
2011-03-08 19:43:29 -06:00
Tor Lillqvist 1a60bef59e Silence compiler warnings 2011-02-03 00:44:35 +02:00
Bjoern Michaelsen e09da93efa gnumake2: fixing broken makedepend behaviour 2010-12-13 18:21:24 +01:00
Caolán McNamara fa4882b94f add modelines to .h files as well 2010-10-28 15:47:03 +01:00
Caolán McNamara ed6f79269a CLang++ Dead increment 2010-10-18 14:43:28 +01:00
Vladimir Glazounov cf4a236453 INTEGRATION: CWS vgbugs04 (1.3.62); FILE MERGED
2006/08/31 10:34:13 vg 1.3.62.2: #i69015# generic paths for windows
2006/07/04 10:37:14 vg 1.3.62.1: #137785# optimize makedepend
2006-09-22 07:56:58 +00:00
Sander Vesik b7055f530b INTEGRATION: CWS ooo20040329 (1.2.68); FILE MERGED
2004/03/17 12:35:33 waratah 1.2.68.1: #i1858# add return types to subroutines
add include file for string routines
add a couple of forward declarations for internal routines
2004-04-21 12:26:47 +00:00
Hans-Joachim Lankenau 130eb54260 don't match directories 2002-06-04 11:51:57 +00:00
Nils Fuhrmann 079f63939d Added makedepend 2001-04-18 08:11:00 +00:00