Daniel J Sebald
2017-03-29 19:01:21 UTC
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.
One in particular I have a question about:
diff -u -r1.6 QtGnuplotApplication.cpp
--- src/qtterminal/QtGnuplotApplication.cpp 29 Jan 2014 15:48:51 -0000 1.6
+++ src/qtterminal/QtGnuplotApplication.cpp 29 Mar 2017 18:47:43 -0000
@@ -80,8 +80,8 @@
// Some programs executing gnuplot -persist may be waiting for all
default
// handles to be closed before they consider the sub-process finished.
// Using freopen() ensures that debug fprintf()s won't crash.
- freopen("/dev/null","w",stdout);
- freopen("/dev/null","w",stderr);
+ if (freopen("/dev/null","w",stdout));
+ if (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. Qt has it's own
messaging system:
http://doc.qt.io/qt-4.8/debug.html
qDebug(), qWarning(), qCritical(), qFatal().
Dan
being set. Attached is a diff file with code changes to get rid of
those warnings.
One in particular I have a question about:
diff -u -r1.6 QtGnuplotApplication.cpp
--- src/qtterminal/QtGnuplotApplication.cpp 29 Jan 2014 15:48:51 -0000 1.6
+++ src/qtterminal/QtGnuplotApplication.cpp 29 Mar 2017 18:47:43 -0000
@@ -80,8 +80,8 @@
// Some programs executing gnuplot -persist may be waiting for all
default
// handles to be closed before they consider the sub-process finished.
// Using freopen() ensures that debug fprintf()s won't crash.
- freopen("/dev/null","w",stdout);
- freopen("/dev/null","w",stderr);
+ if (freopen("/dev/null","w",stdout));
+ if (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. Qt has it's own
messaging system:
http://doc.qt.io/qt-4.8/debug.html
qDebug(), qWarning(), qCritical(), qFatal().
Dan