Ramsay Jones <ram...@ramsayjones.plus.com> writes:

> Commit 8f4f6e53d2 ("config.mak.uname: set FREAD_READS_DIRECTORIES for
> Linux and FreeBSD", 20-04-2017) caused sparse to issue a 'not declared,
> should it be static?' warning on Linux. This is a result of the method
> employed by 'compat/fopen.c' to suppress the (possible) redefinition of
> the (system) fopen macro, which also removes the extern declaration of
> the git_fopen function.
>
> In order to suppress the warning, introduce a new macro to suppress the
> definition (or possibly the re-definition) of the fopen symbol as a
> macro override. This new macro (SUPPRESS_FOPEN_REDEFINITION) is only
> defined in 'compat/fopen.c', just prior to the inclusion of the
> 'git-compat-util.h' header file.
>
> Signed-off-by: Ramsay Jones <ram...@ramsayjones.plus.com>
> ---
>
> Hi Duy,
>
> Could you (or Junio) please add this to your 'nd/fopen-errors'
> branch, either as a separate patch or squash it into commit
> 8f4f6e53d2 ("config.mak.uname: set FREAD_READS_DIRECTORIES for
> Linux and FreeBSD", 20-04-2017). I think it would be better as a
> separate commit, but I will leave you to decide on that. ;-)

Yeah, I think it makes sense to have this as a separate patch,
applying even before the other series.

Thanks.

Reply via email to