1
0
mirror of https://github.com/git/git.git synced 2025-03-24 18:01:09 +00:00
git/compat
Ramsay Jones ec535cc27e compat/unsetenv.c: Fix a sparse warning
The gitunsetenv function includes an (redundant) declaration of the
'environ' symbol, which is a pointer to the table of environment
variables. Unfortunately, on MinGW, this provokes sparse to issue
the following warning:

    compat/unsetenv.c:5:20: warning: non-ANSI function declaration of \
    function '__p__environ'

On MinGW, the <stdlib.h> header defines the 'environ' symbol as a
preprocessor macro (via _environ) which obtains the environ table
pointer via a call to the __p__environ() function.

In order to suppress the warning, we simply remove the redundant
declaration of the 'environ' symbol, since the symbol is already
declared correctly in <stdlib.h> (included via git-compat-util.h).

Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-04-28 12:26:38 -07:00
..
2009-03-02 18:28:06 -08:00
2012-12-11 15:51:14 -08:00
2007-06-07 00:04:01 -07:00
2010-11-23 16:06:50 -08:00
2011-09-11 14:43:33 -07:00
2013-04-12 12:23:20 -07:00
2009-09-18 20:00:42 -07:00