git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Michael Wookey <michaelwookey@gmail.com>
To: Alex Riesen <raa.lkml@gmail.com>, Junio C Hamano <gitster@pobox.com>
Cc: Sverre Rabbelier <srabbelier@gmail.com>, git@vger.kernel.org
Subject: Re: [PATCH] fast-import.c: Silence build warning
Date: Tue, 1 Sep 2009 09:31:05 +1000	[thread overview]
Message-ID: <d2e97e800908311631x6fdd7781v2e893d1ca62378b6@mail.gmail.com> (raw)
In-Reply-To: <81b0412b0908311427t5b4a24ffg1d7d272669476117@mail.gmail.com>

2009/9/1 Alex Riesen <raa.lkml@gmail.com>:
> On Mon, Aug 31, 2009 at 14:29, Sverre Rabbelier<srabbelier@gmail.com> wrote:
>> On Mon, Aug 31, 2009 at 04:21, Michael Wookey<michaelwookey@gmail.com> wrote:
>>> Provide a dummy variable to keep the compiler happy.
>>
>> Should we not instead check the value?
>
> Why? It is endp (end of the parsed number) we're interested in.

Good point, perhaps the commit message should mention why we don't
bother checking the return value. Something like this maybe?

-- >8 --
gcc 4.3.3 (Ubuntu 9.04) warns that the return value of strtoul() was not
checked by issuing the following notice:

 warning: ignoring return value of ‘strtoul’, declared with attribute
warn_unused_result

The return value of strtoul() isn't used because we are only interested
in what is placed into endp.  As such, provide a dummy variable to keep
the compiler happy.

Signed-off-by: Michael Wookey <michaelwookey@gmail.com>
-- >8 --

  parent reply	other threads:[~2009-08-31 23:31 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-31 11:21 [PATCH] fast-import.c: Silence build warning Michael Wookey
2009-08-31 12:29 ` Sverre Rabbelier
2009-08-31 21:27   ` Alex Riesen
2009-08-31 21:42     ` Sverre Rabbelier
2009-08-31 23:31     ` Michael Wookey [this message]
2009-08-31 23:42 ` Junio C Hamano
2009-08-31 23:55   ` Michael Wookey
2009-09-01  4:06     ` Stephen Boyd
2009-09-01  6:30     ` Alex Riesen

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=d2e97e800908311631x6fdd7781v2e893d1ca62378b6@mail.gmail.com \
    --to=michaelwookey@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=raa.lkml@gmail.com \
    --cc=srabbelier@gmail.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).