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

Re: [PATCH v1 1/1] trace2: NULL is not allowed for va_list

From
Torsten Bögershausen <tboegi@web.de>
Date
Mar 18, 2019, 15:54 UTC
Message-ID
<20190318155459.nrog5r5y3ci3bz3x@tb-raspi4>
In-Reply-To
<30c8b265-d6bf-3265-b2ae-029aa60d63e5@jeffhostetler.com>
On Mon, Mar 18, 2019 at 08:35:26AM -0400, Jeff Hostetler wrote:
Show 16 quoted lines
>
>
> On 3/16/2019 6:47 AM, tboegi@web.de wrote:
> > From: Torsten Bögershausen <tboegi@web.de>
> >
> > Some compilers don't allow NULL to be passed for a va_list.
> > Use va_list instead.
> >
> > Signed-off-by: Torsten Bögershausen <tboegi@web.de>
>
> Thanks for the fixup.
>
> For future reference, can you elaborate on which compiler
> and/or platform has the problem ?
>
> Jeff

It is on a Raspberry PI: gcc (Raspbian 6.3.0-18+rpi1+deb9u1) 6.3.0 20170516

trace2/tr2_tgt_event.c:193:18: error: invalid operands to binary && (have ‘int’ and ‘va_list {aka __va_list}’)
  if (fmt && *fmt && ap) {
        ~~~~~~~~~~~ ^~
(And I couldn't find any hints that va_list and pointers can be mixed,
 and no hints that they can't either)
Previous: Jeff HostetlerNext: Morten Welinder
Message 4 of 5 in “trace2: NULL is not allowed for va_list”
  1. 1/1 trace2: NULL is not allowed for va_listtboegi@web.de, Mar 16, 2019
  2. Junio C HamanoMar 18, 2019
  3. Jeff HostetlerMar 18, 2019
  4. Torsten BögershausenMar 18, 2019
  5. Morten WelinderMar 18, 2019

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.