Re: [PATCH 2/3] combine-diff: suppress a clang warning

2013-02-07 Thread John Keeping
On Thu, Feb 07, 2013 at 01:12:59PM +0900, Miles Bader wrote: > John Keeping writes: > > I generally like to get rid of the pointless warnings so that the useful > > ones can't hide in the noise. Perhaps "CFLAGS += -Wno-string-plus-int" > > would be better for this particular warning, but when the

Re: [PATCH 2/3] combine-diff: suppress a clang warning

2013-02-06 Thread Miles Bader
John Keeping writes: > I generally like to get rid of the pointless warnings so that the useful > ones can't hide in the noise. Perhaps "CFLAGS += -Wno-string-plus-int" > would be better for this particular warning, but when there's only one > bit of code that triggers it, tweaking that seemed si

Re: [PATCH 2/3] combine-diff: suppress a clang warning

2013-02-03 Thread Junio C Hamano
John Keeping writes: >> If we were to be touching that area of code, I'd rather see a change >> to make it more robust against such a corner case. If it results in >> squelching misguided clang warnings against programmers who should >> not be writing in C, that is a nice side effect, but I loat

Re: [PATCH 2/3] combine-diff: suppress a clang warning

2013-02-03 Thread John Keeping
On Sun, Feb 03, 2013 at 01:07:48PM -0800, Junio C Hamano wrote: > John Keeping writes: > > > A quick search turned up the original thread where this feature was > > added to Clang [1]. It seems that it does find genuine bugs where > > people try to log values by doing: > > > > log("failed to

Re: [PATCH 2/3] combine-diff: suppress a clang warning

2013-02-03 Thread Junio C Hamano
John Keeping writes: > A quick search turned up the original thread where this feature was > added to Clang [1]. It seems that it does find genuine bugs where > people try to log values by doing: > > log("failed to handle error: " + errno); To be perfectly honest, anybody who writes such a

Re: [PATCH 2/3] combine-diff: suppress a clang warning

2013-02-03 Thread John Keeping
On Sun, Feb 03, 2013 at 11:58:15AM -0800, Junio C Hamano wrote: > John Keeping writes: > > > When compiling combine-diff.c, clang 3.2 says: > > > > combine-diff.c:1006:19: warning: adding 'int' to a string does not > > append to the string [-Wstring-plus-int] > > prefix =

Re: [PATCH 2/3] combine-diff: suppress a clang warning

2013-02-03 Thread Junio C Hamano
John Keeping writes: > When compiling combine-diff.c, clang 3.2 says: > > combine-diff.c:1006:19: warning: adding 'int' to a string does not > append to the string [-Wstring-plus-int] > prefix = COLONS + offset; >~~~^~~~ > combine-di

Re: [PATCH 2/3] combine-diff: suppress a clang warning

2013-02-03 Thread John Keeping
On Mon, Feb 04, 2013 at 02:20:06AM +0800, Tay Ray Chuan wrote: > On Sun, Feb 3, 2013 at 10:37 PM, John Keeping wrote: > > When compiling combine-diff.c, clang 3.2 says: > > > > combine-diff.c:1006:19: warning: adding 'int' to a string does not > > append to the string [-Wstring-plu

Re: [PATCH 2/3] combine-diff: suppress a clang warning

2013-02-03 Thread Tay Ray Chuan
On Sun, Feb 3, 2013 at 10:37 PM, John Keeping wrote: > When compiling combine-diff.c, clang 3.2 says: > > combine-diff.c:1006:19: warning: adding 'int' to a string does not > append to the string [-Wstring-plus-int] > prefix = COLONS + offset; >

[PATCH 2/3] combine-diff: suppress a clang warning

2013-02-03 Thread John Keeping
When compiling combine-diff.c, clang 3.2 says: combine-diff.c:1006:19: warning: adding 'int' to a string does not append to the string [-Wstring-plus-int] prefix = COLONS + offset; ~~~^~~~ combine-diff.c:1006:19: note: use array