# [PATCH] sparse: suppress an "using sizeof on a function" warning

4 messages from 2014-11-07 to 2014-11-07. Participants: Ramsay Jones, ockham@raz.or.at, Junio C Hamano.
Thread: https://gitlist.dev/t/37895

## Ramsay Jones, 2014-11-07 13:50

Subject: [PATCH] sparse: suppress an "using sizeof on a function" warning
Message-ID: <545CCE23.5080507@ramsay1.demon.co.uk>
URL: https://gitlist.dev/e/545CCE23.5080507%40ramsay1.demon.co.uk

```
Commit d57da44b1 ("imap-send: use libcurl for implementation",
06-11-2014) updates the implementation of the imap-send command
to make use of libcurl's high(er)-level API functions.

In doing so, this introduces a sparse warning about "using sizeof
on a function". In order to suppress the warning, we use the same
solution used in commit 9371322a6 ("sparse: suppress some "using
sizeof on a function" warnings", 06-10-2013) which solved exactly
this problem for the other commands using libcurl.

Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
---

Hi Bernhard,

If you need to re-roll your 'br/imap-send-via-libcurl' branch, could
you please squash this into your patch.

Thanks!

ATB,
Ramsay Jones

 Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Makefile b/Makefile
index 1ded274..0fc2790 100644
--- a/Makefile
+++ b/Makefile
@@ -1930,7 +1930,7 @@ gettext.sp gettext.s gettext.o: GIT-PREFIX
 gettext.sp gettext.s gettext.o: EXTRA_CPPFLAGS = \
 	-DGIT_LOCALE_PATH='"$(localedir_SQ)"'
 
-http-push.sp http.sp http-walker.sp remote-curl.sp: SPARSE_FLAGS += \
+http-push.sp http.sp http-walker.sp remote-curl.sp imap-send.sp: SPARSE_FLAGS += \
 	-DCURL_DISABLE_TYPECHECK
 
 ifdef NO_EXPAT
-- 
2.1.0

```

## ockham@raz.or.at, 2014-11-07 20:01

Subject: Re: [PATCH] sparse: suppress an "using sizeof on a function" warning
Message-ID: <20141107210150.Horde.XRUyBUv4Cn9UXSUur_a0avA@webmail.domainplanet.at>
URL: https://gitlist.dev/e/20141107210150.Horde.XRUyBUv4Cn9UXSUur_a0avA%40webmail.domainplanet.at
In-Reply-To: <545CCE23.5080507@ramsay1.demon.co.uk>

```
Zitat von Ramsay Jones <ramsay@ramsay1.demon.co.uk>:

> Commit d57da44b1 ("imap-send: use libcurl for implementation",
> 06-11-2014) updates the implementation of the imap-send command
> to make use of libcurl's high(er)-level API functions.
>
> In doing so, this introduces a sparse warning about "using sizeof
> on a function". In order to suppress the warning, we use the same
> solution used in commit 9371322a6 ("sparse: suppress some "using
> sizeof on a function" warnings", 06-10-2013) which solved exactly
> this problem for the other commands using libcurl.
>
> Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
> ---
>
> Hi Bernhard,
>
> If you need to re-roll your 'br/imap-send-via-libcurl' branch, could
> you please squash this into your patch.
>
> Thanks!

Hi Ramsay,

and thanks for your fix! TBH, I didn't even notice that my patch had  
already been committed and instead posted a refined version earlier  
today [1] (which unfortunately didn't contain your fix, either).

Not sure how to proceed. Maybe Junio can enlighten?

Regards
Bernhard

[1] http://www.mail-archive.com/git@vger.kernel.org/msg60576.html

> ATB,
> Ramsay Jones
>
>  Makefile | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/Makefile b/Makefile
> index 1ded274..0fc2790 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -1930,7 +1930,7 @@ gettext.sp gettext.s gettext.o: GIT-PREFIX
>  gettext.sp gettext.s gettext.o: EXTRA_CPPFLAGS = \
>  	-DGIT_LOCALE_PATH='"$(localedir_SQ)"'
>
> -http-push.sp http.sp http-walker.sp remote-curl.sp: SPARSE_FLAGS += \
> +http-push.sp http.sp http-walker.sp remote-curl.sp imap-send.sp:  
> SPARSE_FLAGS += \
>  	-DCURL_DISABLE_TYPECHECK
>
>  ifdef NO_EXPAT
> --
> 2.1.0

```

## Junio C Hamano, 2014-11-07 20:08

Subject: Re: [PATCH] sparse: suppress an "using sizeof on a function" warning
Message-ID: <xmqq4muag4du.fsf@gitster.dls.corp.google.com>
URL: https://gitlist.dev/e/xmqq4muag4du.fsf%40gitster.dls.corp.google.com
In-Reply-To: <20141107210150.Horde.XRUyBUv4Cn9UXSUur_a0avA@webmail.domainplanet.at>

```
ockham@raz.or.at writes:

> Hi Ramsay,
>
> and thanks for your fix! TBH, I didn't even notice that my patch had
> already been committed and instead posted a refined version earlier
> today [1] (which unfortunately didn't contain your fix, either).
>
> Not sure how to proceed. Maybe Junio can enlighten?

There is no "already committed" ;-)

Your patch is merely queued on 'pu' (proposed updates), which we all
expect to be rerolled.  You can just reroll another round, but you
might want to wait a bit to see if there are more issues spotted by
other people before doing so.

```

## ockham@raz.or.at, 2014-11-07 21:07

Subject: Re: [PATCH] sparse: suppress an "using sizeof on a function" warning
Message-ID: <20141107220751.Horde.o8yUBEv4Cn9UXTSnElF0bLA@webmail.domainplanet.at>
URL: https://gitlist.dev/e/20141107220751.Horde.o8yUBEv4Cn9UXTSnElF0bLA%40webmail.domainplanet.at
In-Reply-To: <xmqq4muag4du.fsf@gitster.dls.corp.google.com>

```
Zitat von Junio C Hamano <gitster@pobox.com>:

> Your patch is merely queued on 'pu' (proposed updates), which we all
> expect to be rerolled.  You can just reroll another round, but you
> might want to wait a bit to see if there are more issues spotted by
> other people before doing so.

Okay, I clearly need to acquaint myself some more with this project's  
review process.

One more question though I couldn't find answered in  
Documentation/SubmittingPatches: When squashing Ramsay's commit into  
mine,
a) do I just keep the commit messages concatenated to each other, or
b) do I reword his to fit in better with mine, and put the  
Signed-off-by lines at the very end?
c) ?

Bernhard

```
