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

Re: [PATCH] repository: fix a sparse 'using integer a NULL pointer' warning

From
brian m. carlson <sandals@crustytoothpaste.net>
Date
Aug 22, 2017, 02:11 UTC
Message-ID
<20170822021124.4bmlzpdocgheo55b@genre.crustytoothpaste.net>
In-Reply-To
<91150cfc-3271-16b0-33d3-9a4e149dc9fe@ramsayjones.plus.com>
On Mon, Aug 21, 2017 at 04:48:42PM +0100, Ramsay Jones wrote:
Show 16 quoted lines
> 
> Commit 67a9dfcc00 ("hash-algo: integrate hash algorithm support with
> repo setup", 21-08-2017) added a 'const struct git_hash_algo *hash_algo'
> field to the repository structure, without modifying the initializer
> of the 'the_repo' variable. This does not actually introduce a bug,
> since the '0' initializer for the 'ignore_env:1' bit-field is
> interpreted as a NULL pointer (hence the warning), and the final field
> (now with no initializer) receives a default '0'.
> 
> Signed-off-by: Ramsay Jones <ramsay@ramsayjones.plus.com>
> ---
> 
> Hi Brian,
> 
> If you need to re-roll your 'bc/hash-algo' branch, could you please
> squash this into the relevant patch.

Of course, thanks. I'll almost certainly be doing a reroll since it's an RFC series and I expect to get more feedback on it.

-- 
brian m. carlson / brian with sandals: Houston, Texas, US
https://www.crustytoothpaste.net/~bmc | My opinion only
OpenPGP: https://keybase.io/bk2204
Previous: Ramsay JonesNext: René Scharfe
Message 2 of 4 in “repository: fix a sparse 'using integer a NULL pointer' warning”
  1. repository: fix a sparse 'using integer a NULL pointer' warningRamsay Jones, Aug 21, 2017
  2. brian m. carlsonAug 22, 2017
  3. René ScharfeAug 22, 2017
  4. Junio C HamanoAug 22, 2017

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.