Re: Warning message in remote.c when compiling

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,

On 2024-04-06 16:21, prpr 19xx wrote:
I get this warning message when compiling remote.c:

...
    CC remote.o
remote.c:596: warning: 'remotes_remote_get' declared inline after being called remote.c:596: warning: previous declaration of 'remotes_remote_get' was here
    CC replace-object.o
...

Could you, please, provide more details about your environment,
i.e. the operating system and compiler?

This is from the "master" branch, but it's the same on "next". It's
easily fixed with this patch:

diff --git a/remote.c b/remote.c
index 2b650b8..347f504 100644
--- a/remote.c
+++ b/remote.c
@@ -592,7 +592,7 @@ const char *pushremote_for_branch(struct branch
*branch, int *explicit)
                                             branch, explicit);
 }

-static struct remote *remotes_remote_get(struct remote_state *remote_state,
+static inline struct remote *remotes_remote_get(struct remote_state
*remote_state,
                                         const char *name);

 const char *remote_ref_for_branch(struct branch *branch, int for_push)

Thanks.




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux