threads / patch / 33288

patch, 2 partsFix -Wuninitialized warnings on older gcc

Subject: [PATCH 0/2] Fix -Wuninitialized warnings on older gcc

## tl;dr

One message between Mar 26, 2013 and Mar 26, 2013. Diffs are folded; open one to read it.

replies: 0people: 1as markdown or json

Ramsay Jones· Mar 26, 2013, 19:08 UTC · lore
Hi Junio,

I had prepared 3 patches, but I noticed this afternoon that the warning in transport.c has already been fixed in maint. These were built on the tip of master as of saturday evening (master @ 7b592fad).

Just FYI, as of saturday, Jeff's patches in maint/master had removed 40 warnings from the MSVC build; 34 of the warnings were due to commit 25043d8a all on it's lonesome! [1]. The additional patches in pu, remove an additional 14 warnings. This leaves only the following:

    $ grep warning msvc-pout | grep uninit
    c:\msysgit\msysgit\home\ramsay\git\fast-import.c(2916) : warning C4700:\
    uninitialized local variable 'oe' used
    c:\msysgit\msysgit\home\ramsay\git\builtin\rev-list.c(341) : warning C4700:\
    uninitialized local variable 'reaches' used
    c:\msysgit\msysgit\home\ramsay\git\builtin\rev-list.c(341) : warning C4700:\
    uninitialized local variable 'all' used
    c:\msysgit\msysgit\home\ramsay\git\merge-recursive.c(1886) : warning C4700:\
    uninitialized local variable 'mrtree' used

ATB, Ramsay Jones

[1] In case you are puzzled by this, the warning is coming from the linker, since the msvc build is using link-time code-gen/optimisation.

Ramsay Allan Jones (2):
  fast-import: Fix an gcc -Wuninitialized warning
  cat-file: Fix an gcc -Wuninitialized warning
 builtin/cat-file.c | 2 +-
 fast-import.c      | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)
-- 
1.8.2

← back to recent threads