git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [RFC PATCH 4/3] Add example git-vcs-p4

From
Daniel Barkalow <barkalow@iabervon.org>
Date
Jan 12, 2009, 05:41 UTC
Message-ID
<alpine.LNX.1.00.0901120026290.19665@iabervon.org>
In-Reply-To
<7vy6xhl1i7.fsf@gitster.siamese.dyndns.org>
On Sun, 11 Jan 2009, Junio C Hamano wrote:
Show 17 quoted lines
> Hmm...
> 
>     CC vcs-p4.o
> cc1: warnings being treated as errors
> vcs-p4.c: In function 'output_data':
> vcs-p4.c:253: warning: format '%d' expects type 'int', but argument 2 has type 'size_t'
> vcs-p4.c: In function 'p4_where':
> vcs-p4.c:291: warning: ISO C90 forbids mixed declarations and code
> vcs-p4.c: In function 'p4_submit':
> vcs-p4.c:363: warning: ISO C90 forbids mixed declarations and code
> vcs-p4.c: In function 'p4_print':
> vcs-p4.c:433: warning: format '%d' expects type 'int', but argument 2 has type 'size_t'
> vcs-p4.c: In function 'p4_change':
> vcs-p4.c:453: warning: ISO C90 forbids mixed declarations and code
> vcs-p4.c: In function 'p4_filelog':
> vcs-p4.c:504: warning: ISO C90 forbids mixed declarations and code
> make: *** [vcs-p4.o] Error 1

I haven't been over the 4/3 stuff for coding style yet. But how do you get these warnings? My gcc 4.1.2 doesn't seem to want to complain about non-C90 usage except in strict C90 mode, where it gets more upset about "inline" all over the place.

	-Daniel
*This .sig left intentionally blank*
Previous: Junio C HamanoNext: Junio C Hamano
Message 3 of 6 in “Add example git-vcs-p4”
  1. 4/3 Add example git-vcs-p4Daniel Barkalow, Jan 11, 2009
  2. Junio C HamanoJan 12, 2009
  3. Daniel BarkalowJan 12, 2009
  4. Junio C HamanoJan 12, 2009
  5. Alex RiesenJan 12, 2009
  6. Daniel BarkalowJan 12, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.