Re: [PATCH] avoid "defined but not used" warning for fetch_objs_via_walker

2 messages, 2 authors, 2016-06-15 · open the first message on its own page

Re: [PATCH] avoid "defined but not used" warning for fetch_objs_via_walker

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:43:52

Jeff King [off-list ref] writes:
Because this function is static and used only by the
http-walker, when NO_CURL is defined, gcc emits a "defined
but not used" warning.

Signed-off-by: Jeff King <redacted>
---
On master. I like to compile with -Werror to make sure I don't miss
warnings as the compile scrolls by.

This fix feels a little wrong, since the function isn't specific to http
support, but hopefully the comment should be obvious if we ever add
another similar commit walker that needs it.
Yeah, while I share your -Werror desire it sure feels a bit
dirty.  As it does not look like we will be taking any new
walkers, I think your patch is reasonable, though.

Re: [PATCH] avoid "defined but not used" warning for fetch_objs_via_walker

From: Daniel Barkalow <hidden>
Date: 2016-06-15 22:43:53

On Tue, 20 Nov 2007, Junio C Hamano wrote:
Jeff King [off-list ref] writes:
quoted
Because this function is static and used only by the
http-walker, when NO_CURL is defined, gcc emits a "defined
but not used" warning.

Signed-off-by: Jeff King <redacted>
---
On master. I like to compile with -Werror to make sure I don't miss
warnings as the compile scrolls by.

This fix feels a little wrong, since the function isn't specific to http
support, but hopefully the comment should be obvious if we ever add
another similar commit walker that needs it.
Yeah, while I share your -Werror desire it sure feels a bit
dirty.  As it does not look like we will be taking any new
walkers, I think your patch is reasonable, though.
I think we're likely to do sftp someday, but everything is likely to get 
reorganized before that anyway.

	-Daniel
*This .sig left intentionally blank*
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help