git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Peter Wu <peter@lekensteyn.nl>
To: Stefan Beller <sbeller@google.com>
Cc: Michael Blume <blume.mike@gmail.com>,
	Johannes.Schindelin@gmx.de, eungjun.yi@navercorp.com,
	Git List <git@vger.kernel.org>,
	Junio C Hamano <gitster@pobox.com>
Subject: Re: Git compile warnings (under mac/clang)
Date: Thu, 22 Jan 2015 22:19:03 +0100	[thread overview]
Message-ID: <8235317.pb98ayo4Kl@al> (raw)
In-Reply-To: <CAGZ79kaFWL5HWdctLzTWf6D4nTP19sPZbcOg9fiRx7RQrWjY7Q@mail.gmail.com>

On Thursday 22 January 2015 11:59:54 Stefan Beller wrote:
> cc Johannes Schindelin <Johannes.Schindelin@gmx.de> who is working in
> the fsck at the moment
> cc Peter Wu <peter@lekensteyn.nl> who worked on builtin/remote.c a few weeks ago
> 
> I just compiled origin/pu to test and also found a problem (doesn't
> happen in origin/master):
> 
> http.c: In function 'get_preferred_languages':
> http.c:1020:2: warning: implicit declaration of function 'setlocale'
> [-Wimplicit-function-declaration]
>   retval = setlocale(LC_MESSAGES, NULL);
>   ^
> http.c:1020:21: error: 'LC_MESSAGES' undeclared (first use in this function)
>   retval = setlocale(LC_MESSAGES, NULL);
>                      ^
> http.c:1020:21: note: each undeclared identifier is reported only once
> for each function it appears in
> 
> so I cc Yi EungJun <eungjun.yi@navercorp.com> as well.
> 
> On Thu, Jan 22, 2015 at 11:43 AM, Michael Blume <blume.mike@gmail.com> wrote:
> > These are probably minor, I only bring them up because Git's build is
> > generally so quiet that it might be worth squashing these too.
> >
> >     CC fsck.o
> > fsck.c:110:38: warning: comparison of unsigned enum expression >= 0 is
> > always true [-Wtautological-compare]
> >         if (options->msg_severity && msg_id >= 0 && msg_id < FSCK_MSG_MAX)
> >                                      ~~~~~~ ^  ~
> > 1 warning generated.
> >     AR libgit.a
> > /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib:
> > file: libgit.a(gettext.o) has no symbols
> >     CC builtin/remote.o
> > builtin/remote.c:1572:5: warning: add explicit braces to avoid
> > dangling else [-Wdangling-else]
> >                                 else
> >                                 ^
> > builtin/remote.c:1580:5: warning: add explicit braces to avoid
> > dangling else [-Wdangling-else]
> >                                 else
> >                                 ^
> > 2 warnings generated.

Hi, these warnings were present in v3 of the git-remote patch. v4 was
proposed to overcome these issues, but I have yet to respond to Junio's
feedback at http://www.spinics.net/lists/git/msg243652.html
(Message-ID: <xmqqr3vx9ad5.fsf@gitster.dls.corp.google.com>)

(cc'ing Junio to let him know I am still alive :p)

I'll get back to this next week, had some other tasks to prepare for.

Kind regards,
Peter

> > (the warning about libgit.a(gettext.o) is probably because I'm
> > building with NO_GETTEXT -- I've never been able to get gettext to
> > work on my mac)

  reply	other threads:[~2015-01-22 21:19 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-22 19:43 Git compile warnings (under mac/clang) Michael Blume
2015-01-22 19:59 ` Stefan Beller
2015-01-22 21:19   ` Peter Wu [this message]
2015-01-22 21:20   ` Johannes Schindelin
2015-01-22 22:01     ` Jeff King
2015-01-23 11:48       ` Johannes Schindelin
2015-01-23 12:23         ` Jeff King
2015-01-23 12:38           ` Johannes Schindelin
2015-01-23 13:30             ` Jeff King
2015-01-23 18:07               ` Junio C Hamano
2015-01-23 18:37                 ` Jeff King
2015-01-23 18:46                   ` Johannes Schindelin
2015-01-23 18:55                     ` Jeff King
2015-01-23 19:20                       ` Johannes Schindelin
2015-01-23 18:48                   ` Junio C Hamano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8235317.pb98ayo4Kl@al \
    --to=peter@lekensteyn.nl \
    --cc=Johannes.Schindelin@gmx.de \
    --cc=blume.mike@gmail.com \
    --cc=eungjun.yi@navercorp.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=sbeller@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).