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

Re: [PATCH 2/2] cat-file: Fix an gcc -Wuninitialized warning

From
Ramsay Jones <ramsay@ramsay1.demon.co.uk>
Date
Mar 28, 2013, 18:48 UTC
Message-ID
<5154908B.1040801@ramsay1.demon.co.uk>
In-Reply-To
<20130326193539.GB28244@sigill.intra.peff.net>
Jeff King wrote:
Show 11 quoted lines
> On Tue, Mar 26, 2013 at 07:20:11PM +0000, Ramsay Jones wrote:
> 
>> After commit cbfd5e1c ("drop some obsolete "x = x" compiler warning
>> hacks", 21-03-2013) removed a gcc specific hack, older versions of
>> gcc now issue an "'contents' might be used uninitialized" warning.
>> In order to suppress the warning, we simply initialize the variable
>> to NULL in it's declaration.
> 
> I'm OK with this, if it's the direction we want to go. But I thought the
> discussion kind of ended as "we do not care about these warnings on
> ancient versions of gcc; those people should use -Wno-error=uninitialized".

Hmm, I don't recall any agreement or conclusions being reached. I guess I missed that!

> What version of gcc are you using? If it is the most recent thing
> reasonably available on msysgit, then I am more sympathetic. But if it's
> just an antique version of gcc, I am less so.
(see previous email for compiler versions).

I suppose it depends on what you consider antique. [I recently downloaded the "first C compiler" from github. Yes, that is an antique compiler! ;-)] I would call some of the compilers I use "a bit mature." :-P

Hmm, so are you saying that this patch is not acceptable because I used a compiler that is no longer supported?

ATB, Ramsay Jones

Previous: Jeff KingNext: Jeff King
Message 4 of 6 in “cat-file: Fix an gcc -Wuninitialized warning”
  1. 2/2 cat-file: Fix an gcc -Wuninitialized warningRamsay Jones, Mar 26, 2013
  2. Jeff KingMar 26, 2013
  3. Jeff KingMar 26, 2013
  4. Ramsay JonesMar 28, 2013
  5. Jeff KingMar 28, 2013
  6. Jonathan NiederMar 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.