[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: socket.h
From: |
Jim Meyering |
Subject: |
Re: socket.h |
Date: |
Tue, 24 Jan 2006 14:15:59 +0100 |
Simon Josefsson <address@hidden> wrote:
>> Any objection to removing [useless parentheses]?
>
> No, please install them.
Ok. I've checked that in.
> I agree. I wish 'indent' could fix this
> too. Maybe it can? Even if I agree many code writing ideas given
> here, I forget them all the time.
I tend to forget, too, so have automated quite a few policy checks,
over the years. You might try adding some checks like those in coreutils'
Makefile.maint. Here are the syntax-check (sc) target names:
sc_cast_of_argument_to_free
sc_cast_of_x_alloc_return_value
sc_cast_of_alloca_return_value
sc_dd_max_sym_length
sc_error_exit_success
sc_file_system
sc_no_if_have_config_h
sc_obsolete_symbols
sc_prohibit_atoi_atof
sc_prohibit_jm_in_m4
sc_prohibit_assert_without_use
sc_require_config_h
sc_root_tests
sc_space_tab
sc_sun_os_names
sc_system_h_headers
sc_tight_scope
sc_trailing_blank
sc_unmarked_diagnostics
sc_useless_cpp_parens
For example, recently I noticed a file that included assert.h, but that
didn't use assert anywhere. Obviously, it shouldn't include <assert.h>.
The above sc_prohibit_assert_without_use rule checks for that, and found
4 or 5 more offending .c files in coreutils.
If you agree with the spirit of a rule, but want to grant an exception or
two, list the offending files (or regexp) in the corresponding .x-sc-* file.
These tests are run only at `make distcheck' time, so I don't worry
much about portability to deficient versions of programs like grep.
Re: socket.h, Simon Josefsson, 2006/01/24
- Re: socket.h,
Jim Meyering <=