https://bugs.documentfoundation.org/show_bug.cgi?id=152299
Bug ID: 152299
Summary: Remove unused define(s) from C/C++ files
Product: LibreOffice
Version: unspecified
Hardware: All
OS: All
Status: UNCONFIRMED
Severity: normal
Priority: medium
Component: LibreOffice
Assignee: [email protected]
Reporter: [email protected]
There are many macros and symbolic constants defined in LibreOffice C/C++
source code. Throughout the time, some of these defines are no longer in use,
so it is good to remove them to clean up the source code.
Read more about macros here:
https://en.wikipedia.org/wiki/C_preprocessor#Macro_definition_and_expansion
You can check to see if a define is used by searching for it inside the code.
You can use 'git grep' to do a search inside the code.
As an example, look into the below commit. Caolán has mentioned the exact
commit that starting with that, the define is no longer used. Such a comment in
the description is nice to have.
commit 98700f59bb72a2c67b48656eacbac7ebdd4ead7b
Author: Caolán McNamara <[email protected]>
Date: Mon Nov 28 12:42:38 2022 +0000
unused ERR_SWG_OLD_GLOSSARY define
since
commit cae829e9c1394851fc88829d5197460929c2792a
Notes:
The symbolic constants can be consumed/defined in the Makefile(s), so you
should be careful. It is suggested that you limit your changes only to C/C++
sources and the header files. This is an example of a revert for an incorrect
removal:
vcl: restore lost spinner images
214438f1dcce52043c27c39e529cf60ff96c98cf
The above defines where consumed in a Makefile, and as they were created on the
fly, a search didn't show them.
--
You are receiving this mail because:
You are the assignee for the bug.