[Libreoffice-commits] -Werror=format-security
Michael Meeks
michael.meeks at suse.com
Tue Aug 7 06:16:39 PDT 2012
On Tue, 2012-08-07 at 13:53 +0200, Stephan Bergmann wrote:
> No, not for SAL_DEBUG. (SAL_WARN requires an --enable-dbgutil build,
> but which developer doesn't do that, anyway? SAL_INFO requires
> SAL_LOG=+WARN+INFO, but that's on purpose, to keep the default amount of
> output manageable.)
Oh - nice; so SAL_DEBUG just works like an fprintf ? but the git hooks
help you stop committing it ?
> > fprintf (stderr,"foo\n");
> >
> > goes directly, atomically to your terminal pausing the app until it's
> > out and it -just-works- (TM) ;-)
>
> As does SAL_DEBUG (modulo the "pausing the app," which fprintf doesn't
> do either, at least not in a multithreaded process), with the added
> benefit that it is way simpler to output an OUString s with:
I guess it's hard to git grep for sample instances of SAL_DEBUG since
there are none in the code ;-) might be nice to add some sample lines to
the header there; it seems to be a stream-style thing too.
> As does SAL_DEBUG (modulo the "pausing the app," which fprintf
> doesn't do either, at least not in a multithreaded process),
In my experience writing to stderr is synchronous; ie.
fprintf (stderr, "crash\n");
*((int *)NULL) = 42;
will do what you want; unless SAL_DEBUG guarantees that too it's too
dangerous to be useful for me :-)
ATB,
Michael.
--
michael.meeks at suse.com <><, Pseudo Engineer, itinerant idiot
More information about the LibreOffice
mailing list