|
From: Hans-Bernhard B. <HBB...@t-...> - 2017-03-30 13:02:40
|
Am 29.03.2017 um 21:01 schrieb Daniel J Sebald:
> On my system, configuration results in the unused return variable flag
> being set. Attached is a diff file with code changes to get rid of
> those warnings.
Doing the change like that is just wrong:
> - freopen("/dev/null","w",stdout);
> - freopen("/dev/null","w",stderr);
> + if (freopen("/dev/null","w",stdout));
> + if (freopen("/dev/null","w",stderr));
The usual, widely accepted way of doing that is to cast an unused return
value to (void), i.e.:
(void)freopen("/dev/null","w",stdout);
(void)freopen("/dev/null","w",stderr);
> Should the above really be included in Qt? I don't think that Qt C++
> files need to use FPRINTF() any more for debugging.
That doesn't help with debugging non-QT, non-C++ files in gnuplot at
all, though.
> Qt has it's own
> messaging system:
That's nice to know, but doesn't help us much, because we still want to
be able to work _without_ any Qt involved, too.
|