Date: Fri, 25 Oct 2013 14:26:43 +0200 From: Daniel Hartmeier <daniel@benzedrine.cx> To: freebsd-hackers@freebsd.org, hackers@freebsd.org Subject: Re: warning spew from cddl libnvpair.c Message-ID: <20131025122643.GC12556@insomnia.benzedrine.cx> In-Reply-To: <20131025113946.GA15905@britannica.bec.de> References: <1382672957.18382.11.camel@localhost> <20131025113946.GA15905@britannica.bec.de>
next in thread | previous in thread | raw e-mail | index | archive | help
How is that valid? If nvprt_btwnarrfmt contains %, how would (void) fprintf(fp, pctl->nvprt_btwnarrfmt); \ not crash? And if it may not contain %, why not use (void) fprintf(fp, "%s", pctl->nvprt_btwnarrfmt); \ It can be set to arbitrary values with libnvpair.c nvlist_prtctl_setfmt() That's exactly why the compiler warns, no? If anything in the macro/preprocessor trickery is relevant, I'm not seeing it. Daniel
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20131025122643.GC12556>