[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
sc_prohibit_*_without_use
From: |
Bruno Haible |
Subject: |
sc_prohibit_*_without_use |
Date: |
Tue, 17 Jan 2012 19:53:15 +0100 |
User-agent: |
KMail/4.7.4 (Linux/3.1.0-1.2-desktop; KDE/4.7.4; x86_64; ; ) |
Hi Jim,
Would it be possible to generalize the sc_prohibit_*_without_use rules
to more header files easily?
# Don't include this header unless you use one of its functions.
sc_prohibit_error_without_use:
@h='error.h' \
re='\<error(_at_line|_print_progname|_one_per_line|_message_count)?
*\('\
$(_sc_header_without_use)
How about generating the list of identifiers that are declared in a header
file (macros, variables, functions, type, struct names, union names,
enum names, enum tags) and compute a regular expression that matches them?
For the first part, one could use 'ctags'? Or, if only 'extern' declared
entities matter, one can use this script that I use in libunistring:
http://git.savannah.gnu.org/gitweb/?p=libunistring.git;a=blob;f=lib/declared.sh
Also, it would be useful to extend this to POSIX header files, such
as <stdlib.h> or <unistd.h>, by making use of the info found in
glibc/conform/data/*.h-data.
Bruno
- Re: [PATCH 2/8] maint: remove empty lines at EOF, but excluding modules/*, (continued)
- Re: [PATCH 2/8] maint: remove empty lines at EOF, but excluding modules/*, Eric Blake, 2012/01/21
- Re: [PATCH 2/8] maint: remove empty lines at EOF, but excluding modules/*, Jim Meyering, 2012/01/21
- Re: [PATCH 2/8] maint: remove empty lines at EOF, but excluding modules/*, Jim Meyering, 2012/01/21
- Re: [PATCH 2/8] maint: remove empty lines at EOF, but excluding modules/*, Bruno Haible, 2012/01/21
- Re: [PATCH 2/8] maint: remove empty lines at EOF, but excluding modules/*, Jim Meyering, 2012/01/21
- Re: [PATCH 2/8] maint: remove empty lines at EOF, but excluding modules/*, Eric Blake, 2012/01/23
- Re: [PATCH 2/8] maint: remove empty lines at EOF, but excluding modules/*, Paul Eggert, 2012/01/23
- Re: [PATCH 2/8] maint: remove empty lines at EOF, but excluding modules/*, Eric Blake, 2012/01/23
- Re: [PATCH 2/8] maint: remove empty lines at EOF, but excluding modules/*, Paul Eggert, 2012/01/23
[PATCH 4/8] maint: enable sc_prohibit_hash_pjw_without_use, Jim Meyering, 2012/01/17
sc_prohibit_*_without_use,
Bruno Haible <=