Re: [PATCH 12/15] use get_commit_buffer everywhere

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Jun 09, 2014 at 08:02:24PM -0400, Jeff King wrote:

> I'm still confused and disturbed that my gcc is not noticing this
> obvious const violation. Hmm, shutting off ccache seems to make it work.
> Doubly disturbing.

Ah, mystery solved. It's a gcc bug:

  https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60014

I get:

  $ gcc -c -Wall -Werror -DSHA1_HEADER='"block-sha1/sha1.h"' notes-merge.c
  notes-merge.c: In function ‘notes_merge_commit’:
  notes-merge.c:723:2: error: passing argument 2 of ‘strbuf_attach’
    discards ‘const’ qualifier from pointer target type [-Werror]
  ...etc...

  $ gcc -E -Wall -Werror -DSHA1_HEADER='"block-sha1/sha1.h"' notes-merge.c >foo.c
  $ gcc -c -Wall -Werror -DSHA1_HEADER='"block-sha1/sha1.h"' foo.c
  [no warnings from either]

ccache uses the latter technique.

-Peff
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]