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

Re: [PATCH 1/6] clone: Make the 'junk_mode' symbol a file static

From
Jeff King <peff@peff.net>
Date
Apr 27, 2013, 23:21 UTC
Message-ID
<20130427232124.GA13800@sigill.intra.peff.net>
In-Reply-To
<517C1B48.5090206@ramsay1.demon.co.uk>
On Sat, Apr 27, 2013 at 07:39:04PM +0100, Ramsay Jones wrote:
Show 8 quoted lines
> Sparse issues an "'junk_mode' not declared. Should it be static?"
> warning. In order to suppress the warning, since this symbol does
> not need more than file visibility, we simply add the static
> modifier to it's declaration.
> [...]
> -enum {
> +static enum {
>  	JUNK_LEAVE_NONE,

Thanks. This one was done by me, and yes it should be static. I think it is because I originally typed:

  enum junk_mode {
    ...
  };
  static enum junk_mode junk_mode;

and then later dropped the named type, but forgot to keep the static keyword.

-Peff
Previous: Ramsay JonesNext: Eric Sunshine
Message 2 of 3 in “clone: Make the 'junk_mode' symbol a file static”
  1. 1/6 clone: Make the 'junk_mode' symbol a file staticRamsay Jones, Apr 27, 2013
  2. Jeff KingApr 27, 2013
  3. Eric SunshineApr 28, 2013

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.