git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH 2/2] Fix sparse warnings

From
Junio C Hamano <gitster@pobox.com>
Date
Mar 21, 2011, 16:15 UTC
Message-ID
<7voc54sb41.fsf@alter.siamese.dyndns.org>
In-Reply-To
<1300700704-22674-2-git-send-email-bebarino@gmail.com>
Stephen Boyd <bebarino@gmail.com> writes:
Show 12 quoted lines
> 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.

Show 9 quoted lines
> 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.
Previous: Junio C HamanoNext: Stephen Boyd
Message 6 of 13 in “Makefile: Cover more files with make check”
  1. 1/2 Makefile: Cover more files with make checkStephen Boyd, Mar 21, 2011
  2. 2/2 Fix sparse warningsStephen Boyd, Mar 21, 2011
  3. Johannes SixtMar 21, 2011
  4. Stephen BoydMar 21, 2011
  5. Junio C HamanoMar 21, 2011
  6. Junio C HamanoMar 21, 2011
  7. 2/2 Fix sparse warningsStephen Boyd, Mar 21, 2011
  8. Junio C HamanoMar 21, 2011
  9. Junio C HamanoMar 21, 2011
  10. Stephen BoydMar 21, 2011
  11. 2/2 Fix sparse warningsStephen Boyd, Mar 22, 2011
  12. Junio C HamanoMar 22, 2011
  13. Junio C HamanoMar 21, 2011

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.