Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20130518100257.XWGMD.96662.imail@eastrmwml205>
Date: Sat, 18 May 2013 10:02:57 -0400
From:  <jfoug@....net>
To: john-dev@...ts.openwall.com
Cc: Alexander Cherepanov <cherepan@...me.ru>
Subject: Re: Unused macros

dynamic_big_crypt.c:25: warning: unused macro 'WAS_MMX_OPENMP' 
dynamic_fmt.c:70: warning: unused macro 'WAS_MMX_OPENMP' 

is actually used later, in the include of dynamic_types.h    Removal of these 2 would have caused OMP builds MMX to fail to link.  In OMP is turned on on MMX builds (there is no thread safe MMX code).  However, the MD5_std.c file has a different MD5_body (the thread safe one), so even though we are not using threads in dyna, we have to KNOW to use the threaded body function.

So in other words, look carefully, and simply because something is defined in a .c file but never used later in it, does not mean it can our should be removed.  Probably pretty hard to eliminate these dangerous false positives using a simple script file.  Many other defines are well worth tracking down, to see if they are simply garbage.  
 
I have not looked too much further (but am doing so).  I think a lot of what you first listed, can be scrapped, but it has to be looked at one by one, carefully.

Jim.

---- Alexander Cherepanov <cherepan@...me.ru> wrote: 
> Hi!
> 
> Attached is a naive perl script to find unused macros (i.e. #define's) 
> in .c files. Its output mimicks gcc's warnings so that you can easily 
> navigate using usual means like next-error in emacs.

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.