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

Re: [PATCH] utf8: NO_ICONV: silence uninitialized variable warning

From
Junio C Hamano <gitster@pobox.com>
Date
Jun 5, 2015, 22:19 UTC
Message-ID
<xmqqeglpre7b.fsf@gitster.dls.corp.google.com>
In-Reply-To
<20150605092309.GA11855@peff.net>
Jeff King <peff@peff.net> writes:
> So I think your patch is the best option, but it might be good to give
> one more look at the callers to be sure we are not missing something.

The two callers both leave the outsz uninitialized and to a human it is obvious that uninitialized outsz is never used when the function or macro returns NULL. It is somewhat sad that we need a useless assignment to *e to help less than intelligent compilers, but it is possible that a clever compiler may be able to optimize the useless assignment away so it might even out in the end ;-)

Will queue.
Thanks.
Previous: Jeff King
Message 3 of 3 in “utf8: NO_ICONV: silence uninitialized variable warning”
  1. utf8: NO_ICONV: silence uninitialized variable warningEric Sunshine, Jun 5, 2015
  2. Jeff KingJun 5, 2015
  3. Junio C HamanoJun 5, 2015

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.