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)