framework - Find/remove useless ifdefs and dead code within them
Marcos Souza
marcos.souza.org at gmail.com
Sat Nov 10 08:51:37 PST 2012
Hi List!
Some days ago, I developed a script that can show to us all ifdefs that
don't have a "#define".
After run this script in the "framework" dir, I get this list:
ifdef ENABLE_COMPONENT_SELF_CHECK without #define. This can be removed?
ifdef DBG_UTIL without #define. This can be removed?
ifdef fpf without #define. This can be removed?
ifdef fpc without #define. This can be removed?
ifdef ENABLE_SERVICEDEBUG without #define. This can be removed?
ifdef ENABLE_TARGETINGDEBUG without #define. This can be removed?
ifdef ENABLE_REGISTRATIONDEBUG without #define. This can be removed?
ifdef ENABLE_PLUGINDEBUG without #define. This can be removed?
ifdef ENABLE_MUTEXDEBUG without #define. This can be removed?
ifdef ENABLE_FILTERDBG without #define. This can be removed?
ifdef ENABLE_EVENTDEBUG without #define. This can be removed?
ifdef ENABLE_GENERATEFILTERCACHE without #define. This can be removed?
This is the output of my script. I belive DBG_UTIL is defined in an other
way (a lot of code within this ifdefs around the LO) but I didn't notice
any define explicitly. But the others, like ENABLE_COMPONENT_SELF_CHECK,
only appears in the framework dir. After some git digs, I saw that this
ifdef was created near 2002/2003, so it seems to very very old...
Tor Lillqvist, told me that we need to get the feedback of the list,
correctly of course, and so I came here to ask you guys, what we can do
with these macros!
I belive with this script, we can remove a lot of dead code within the LO,
but I will need you feedback to verify is these macros are really
unused/dead.
If one of these macros are defined in other way, please tell me, because I
can change the script to skip these ifdefs.
When you answer me, I will send a patch removing what is dead!
Thanks since now!
--
Att,
Marcos Paulo de Souza
Acadêmico de Ciencia da Computação - FURB - SC
Github: https://github.com/marcosps/
"Uma vida sem desafios é uma vida sem razão"
"A life without challenges, is a non reason life"
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/libreoffice/attachments/20121110/eb656ea1/attachment.html>
More information about the LibreOffice
mailing list