Re: [PATCH 2/2] Fix sparse warnings

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

 



Stephen Boyd <bebarino@xxxxxxxxx> writes:

> Fix warnings from 'make check'.
>
> diff.c:631:25: warning: symbol 'diff_words_styles' was not declared.
> Should it be static?
> notes-merge.c:362:73: warning: Using plain integer as NULL pointer
> parse-options.c:564:6: error: symbol 'usage_with_options' redeclared
> with different type (originally declared at parse-options.h:158) -
> different modifiers
> parse-options.c:571:6: error: symbol 'usage_msg_opt' redeclared with
> different type (originally declared at parse-options.h:161) - different
> modifiers
> ...

Yuck.  Could you summarize the errors by grouping them by type or
something in the log?  One mega-patch we can swallow, but the log is
unreadble.

> diff --git a/builtin/clone.c b/builtin/clone.c
> index 02547ad..53ea012 100644
> --- a/builtin/clone.c
> +++ b/builtin/clone.c
> @@ -23,6 +23,7 @@
>  #include "branch.h"
>  #include "remote.h"
>  #include "run-command.h"
> +#include "builtin.h"

Documentation/CodingGuidelines suggests to move this to the top, probably
replacing '#include "cache.h"' we have there:

 - The first #include in C files, except in platform specific
   compat/ implementations, should be git-compat-util.h or another
   header file that includes it, such as cache.h or builtin.h.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]