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 indexing to silence this warning
                prefix = COLONS + offset;
                                ^
                         &      [       ]

Suppress this by making the suggested change.

Signed-off-by: John Keeping <j...@keeping.me.uk>
---
On Thu, Jan 17, 2013 at 11:00:08AM +0000, John Keeping wrote:
> On Thu, Jan 17, 2013 at 11:32:39AM +0100, Antoine Pelisse wrote:
> There is one remaining warning on pu which hasn't been discussed in this
> thread as far as I can see.  I'll send a patch shortly.

... and here it is.

 combine-diff.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/combine-diff.c b/combine-diff.c
index bb1cc96..dba4748 100644
--- a/combine-diff.c
+++ b/combine-diff.c
@@ -1003,7 +1003,7 @@ static void show_raw_diff(struct combine_diff_path *p, 
int num_parent, struct re
                offset = strlen(COLONS) - num_parent;
                if (offset < 0)
                        offset = 0;
-               prefix = COLONS + offset;
+               prefix = &COLONS[offset];
 
                /* Show the modes */
                for (i = 0; i < num_parent; i++) {
-- 
1.8.1
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to