Re: [PATCH] mailinfo: resolve -Wstring-plus-int warning
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Sep 22, 2014, 20:50 UTC
- Message-ID
- <xmqqoau7js6a.fsf@gitster.dls.corp.google.com>
- In-Reply-To
- <1411290838-45622-1-git-send-email-sunshine@sunshineco.com>
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.