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

Re: [PATCH] t0021, t5615: use $PWD instead of $(pwd) in PATH-like shell variables

From
Ramsay Jones <ramsay@ramsayjones.plus.com>
Date
Nov 14, 2016, 19:45 UTC
Message-ID
<27949dcc-e25b-3a4a-15e5-71245670c0f4@ramsayjones.plus.com>
In-Reply-To
<20161114170105.btnohk2777ddaiul@sigill.intra.peff.net>
On 14/11/16 17:01, Jeff King wrote:
Show 8 quoted lines
> On Mon, Nov 14, 2016 at 05:35:56PM +0100, Torsten Bögershausen wrote:
> 
>>> Git 'pu' does not compile on macOS right now:
>>> builtin/bisect--helper.c:299:6: error: variable 'good_syn' is used uninitialized 
>>> whenever 'if' condition is true [-Werror,-Wsometimes-uninitialized]
> 
> The next step is to make sure that the topic author is aware (in this
> case, one assumes it's pb/bisect).
[+cc Pranit]

Yep, I had a quick squint, and it looks like the compiler is correct. It should be complaining about the 'bad_syn' variable for exactly the same reason: namely, whenever the if condition is true, the only exit from that block is via 'goto finish' which bypasses the initialisation of 'good_syn' and 'bad_syn'.

> Better still is to make a patch that can either be applied on top, or
> squashed as appropriate. 

No patch this time, but it simply requires those variables to be initialised to NULL in their declarations. :-D

>                            I know that Ramsay Jones does this, for
> example, with some of his sparse-related checks, and I'm pretty sure
> from the turnaround-time that he runs it against "pu".

Yep, the idea being to catch these simple problems before the topic reaches 'next'.

ATB, Ramsay Jones

Previous: Jeff KingNext: Junio C Hamano
Message 12 of 17 in “mingw: hot-fix t5615”
  1. mingw: hot-fix t5615Johannes Schindelin, Nov 11, 2016
  2. Junio C HamanoNov 11, 2016
  3. Johannes SixtNov 11, 2016
  4. t0021, t5615: use $PWD instead of $(pwd) in PATH-like shell variablesJohannes Sixt, Nov 11, 2016
  5. Jeff KingNov 11, 2016
  6. Junio C HamanoNov 11, 2016
  7. Johannes SchindelinNov 12, 2016
  8. Junio C HamanoNov 13, 2016
  9. Lars SchneiderNov 14, 2016
  10. Torsten BögershausenNov 14, 2016
  11. Jeff KingNov 14, 2016
  12. Ramsay JonesNov 14, 2016
  13. Junio C HamanoNov 14, 2016
  14. Johannes SchindelinNov 15, 2016
  15. Johannes SchindelinNov 16, 2016
  16. Junio C HamanoNov 16, 2016
  17. Jeff KingNov 11, 2016

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.