* [PATCH] sha1_file.c: make parse_sha1_header_extended() static
@ 2015-04-16 12:25 Ramsay Jones
2015-04-17 2:03 ` Karthik Nayak
0 siblings, 1 reply; 2+ messages in thread
From: Ramsay Jones @ 2015-04-16 12:25 UTC (permalink / raw)
To: karthik.188; +Cc: Junio C Hamano, Eric Sunshine, GIT Mailing-list
commit 9e1f5bc0 ("sha1_file.c: support reading from a loose object of
unknown type", 15-04-2015) added a new externally visible function
which does not require more than file scope. This causes sparse to
issue a warning message about this symbol. In order to suppress the
warning, add the static qualifier to the function definition.
[An alternative solution, if this symbol should have external scope,
is to add an external declaration for the function to the "cache.h"
header file (next to the one for parse_sha1_header()).]
Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
---
Hi Karthik,
If you need to re-roll your patches in the 'kn/cat-file-literally'
branch, could you please squash this, or something like it, into
the relevant patch.
Thanks!
ATB,
Ramsay Jones
sha1_file.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sha1_file.c b/sha1_file.c
index 267399d..2b81534 100644
--- a/sha1_file.c
+++ b/sha1_file.c
@@ -1642,7 +1642,7 @@ static void *unpack_sha1_rest(git_zstream *stream, void *buffer, unsigned long s
* too permissive for what we want to check. So do an anal
* object header parse by hand.
*/
-int parse_sha1_header_extended(const char *hdr, struct object_info *oi,
+static int parse_sha1_header_extended(const char *hdr, struct object_info *oi,
unsigned int flags)
{
struct strbuf typename = STRBUF_INIT;
--
2.3.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] sha1_file.c: make parse_sha1_header_extended() static
2015-04-16 12:25 [PATCH] sha1_file.c: make parse_sha1_header_extended() static Ramsay Jones
@ 2015-04-17 2:03 ` Karthik Nayak
0 siblings, 0 replies; 2+ messages in thread
From: Karthik Nayak @ 2015-04-17 2:03 UTC (permalink / raw)
To: Ramsay Jones; +Cc: Junio C Hamano, Eric Sunshine, GIT Mailing-list
On April 16, 2015 5:55:25 PM GMT+05:30, Ramsay Jones <ramsay@ramsay1.demon.co.uk> wrote:
>
>commit 9e1f5bc0 ("sha1_file.c: support reading from a loose object of
>unknown type", 15-04-2015) added a new externally visible function
>which does not require more than file scope. This causes sparse to
>issue a warning message about this symbol. In order to suppress the
>warning, add the static qualifier to the function definition.
>
>[An alternative solution, if this symbol should have external scope,
>is to add an external declaration for the function to the "cache.h"
>header file (next to the one for parse_sha1_header()).]
>
>Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
>---
>
>Hi Karthik,
>
>If you need to re-roll your patches in the 'kn/cat-file-literally'
>branch, could you please squash this, or something like it, into
>the relevant patch.
Thanks for this Ramsay, will be re rolling, will squash it into my commit.
Regards
Karthik
>
>Thanks!
>
>ATB,
>Ramsay Jones
>
> sha1_file.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
>diff --git a/sha1_file.c b/sha1_file.c
>index 267399d..2b81534 100644
>--- a/sha1_file.c
>+++ b/sha1_file.c
>@@ -1642,7 +1642,7 @@ static void *unpack_sha1_rest(git_zstream
>*stream, void *buffer, unsigned long s
> * too permissive for what we want to check. So do an anal
> * object header parse by hand.
> */
>-int parse_sha1_header_extended(const char *hdr, struct object_info
>*oi,
>+static int parse_sha1_header_extended(const char *hdr, struct
>object_info *oi,
> unsigned int flags)
> {
> struct strbuf typename = STRBUF_INIT;
>--
>2.3.0
--
Sent from my Android device with K-9 Mail. Please excuse my brevity.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-04-17 2:04 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-04-16 12:25 [PATCH] sha1_file.c: make parse_sha1_header_extended() static Ramsay Jones
2015-04-17 2:03 ` Karthik Nayak
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.