Date: Sat, 18 May 2013 17:30:55 +0400 From: Alexander Cherepanov <cherepan@...me.ru> To: john-dev@...ts.openwall.com Subject: Unused macros 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. It knows to ignore several macros used in john which are listed at https://gnu.org/software/libc/manual/html_node/Feature-Test-Macros.html (such as _POSIX_SOURCE) but that's all. For core it outputs the following: bench.c:7: warning: unused macro '__POSIX' best.c:11: warning: unused macro '__POSIX' c3_fmt.c:11: warning: unused macro '_XOPEN_VERSION' c3_fmt.c:12: warning: unused macro '_XPG4_2' DES_bs_b.c:721: warning: unused macro 'vandn' DES_bs_b.c:723: warning: unused macro 'vsel' DES_bs_b.c:762: warning: unused macro 'vnot' DES_bs_b.c:1108: warning: unused macro 'DEPTH' DES_bs_b.c:1452: warning: unused macro 'kd' sboxes.c:2: warning: unused macro 'andn' signals.c:9: warning: unused macro '__POSIX' status.c:7: warning: unused macro '__POSIX' All these seems to be falses but I'm not sure they are worth to be being blacklisted in the script. For bleeding a list is attached. It contains 215 items and some are quite amusing (like several unused FORMAT_LABELs). Hope it would be useful for someone. -- Alexander Cherepanov View attachment "unused-macros" of type "text/plain" (1179 bytes) View attachment "unused-macros.bleeding.txt" of type "text/plain" (11918 bytes)
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.