From: Junio C Hamano <gitster@pobox•com>
To: Eric Sunshine <sunshine@sunshineco•com>
Cc: git@vger•kernel.org, Jeff King <peff@peff•net>
Subject: Re: [PATCH] mailinfo: resolve -Wstring-plus-int warning
Date: Mon, 22 Sep 2014 13:50:37 -0700 [thread overview]
Message-ID: <xmqqoau7js6a.fsf@gitster.dls.corp.google.com> (raw)
In-Reply-To: <1411290838-45622-1-git-send-email-sunshine@sunshineco.com> (Eric Sunshine's message of "Sun, 21 Sep 2014 05:13:58 -0400")
Eric Sunshine <sunshine@sunshineco•com> writes:
> however, the solution in this patch allows us drop a couple strlen()s in
> favor of sizeof()s.
It is actually not a very good justification when you know you care
about the length of the string. A decent compiler ought to know the
length of a constant string can be computed at the compilation time.
Let's at least not do that part of the change.
next prev parent reply other threads:[~2014-09-22 20:50 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-21 9:13 [PATCH] mailinfo: resolve -Wstring-plus-int warning Eric Sunshine
2014-09-22 17:41 ` Junio C Hamano
2014-09-22 21:10 ` Eric Sunshine
2014-09-23 6:04 ` Jeff King
2014-09-23 6:26 ` Junio C Hamano
2014-09-23 7:51 ` Jeff King
2014-09-23 8:05 ` Eric Sunshine
2014-09-23 7:58 ` Eric Sunshine
2014-09-23 7:52 ` Eric Sunshine
2014-09-23 8:12 ` Jeff King
2014-09-22 20:50 ` Junio C Hamano [this message]
2014-09-22 21:50 ` Eric Sunshine
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=xmqqoau7js6a.fsf@gitster.dls.corp.google.com \
--to=gitster@pobox$(echo .)com \
--cc=git@vger$(echo .)kernel.org \
--cc=peff@peff$(echo .)net \
--cc=sunshine@sunshineco$(echo .)com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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