Re: [patch] big cleanup.




On Mon, 20 Jun 2005, Robert Love wrote:

> Attached patch does a lot of simple but meaningful cleanup.
> 
> Namely,
> 
>         - Mark 55 non-static functions as static, as they are actually
>         not
>           used outside of file and need not be exported.
>         - Remove two redundant declarations
>         - Put get_autoip() in an autoip.h header and use it.
>         - Remove one local variable shadowing an even-more-local
>         variable.
>         - Add two FIXME's
> 
> There are gcc warning flags to catch the non-static/static mixup in the
> future.  Gcc can warn whenever a non-static function is defined before
> being declared.  This warns you that either (a) the function needs to be
> added to a header file, (b) the header file should be included in the
> source file, or (c) the function can be removed.  Gcc can also warn you
> if a static function is not used, in which case you know to delete it
> (this one is nice).
> 
> The options are "-Wmissing-declarations", "-Wmissing-prototypes", and
> "-Wunused-function".
> 
> Can I apply? / Please apply.

Looks good, please go ahead and commit.

Thanks,
Dan



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]