From: Vincent van Ravesteijn <vfr@lyx.org>
To: git@vger.kernel.org
Cc: gitster@pobox.com, Vincent van Ravesteijn <vfr@lyx.org>
Subject: [PATCH 1/2] Fix a warning about conversion to float
Date: Tue, 6 Mar 2012 09:54:36 +0100 [thread overview]
Message-ID: <1331024077-5736-1-git-send-email-user@vincent-VirtualBox> (raw)
From: Vincent van Ravesteijn <vfr@lyx.org>
Below in the same function, val is correctly casted to a float. Do this also
for the initialization of x.
Signed-off-by: Vincent van Ravesteijn <vfr@lyx.org>
---
bisect.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/bisect.c b/bisect.c
index 6e186e2..4aeb402 100644
--- a/bisect.c
+++ b/bisect.c
@@ -536,7 +536,7 @@ static int get_prn(int count) {
*/
static int sqrti(int val)
{
- float d, x = val;
+ float d, x = (float)val;
if (val == 0)
return 0;
@@ -550,6 +550,7 @@ static int sqrti(int val)
return (int)x;
}
+
static struct commit_list *skip_away(struct commit_list *list, int count)
{
struct commit_list *cur, *previous;
--
1.7.5.4
next reply other threads:[~2012-03-06 8:55 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-06 8:54 Vincent van Ravesteijn [this message]
2012-03-06 8:54 ` [PATCH 2/2] Disambiguate PREFIX define in sideband.c Vincent van Ravesteijn
2012-03-06 19:04 ` Junio C Hamano
2012-03-06 18:58 ` [PATCH 1/2] Fix a warning about conversion to float 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=1331024077-5736-1-git-send-email-user@vincent-VirtualBox \
--to=vfr@lyx.org \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.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).