qcas-0.5.1does not compile with following error:
Code : Tout sélectionner
g++ -c -pipe -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -mtune=generic -Wno-error=format-security -fno-strict-aliasing -Wno-unused-parameter -DGIAC_GENERIC_CONSTANTS -fpermissive -fPIC -Wall -W -D_REENTRANT -DQT_NO_DEBUG -DQT_SVG_LIB -DQT_XML_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/lib64/qt4/mkspecs/linux-g++ -I../../qcas -I/usr/include/QtCore -I/usr/include/QtGui -I/usr/include/QtXml -I/usr/include/QtSvg -I/usr/include -I../../qcas -I../qt -I. -I. -I. -o output.o ../qt/output.cpp
In file included from ../qt/MainWindow.cpp:42:0:
../qt/gui/FormalSheet.h:106:9: warning: extra qualification 'FormalWorkSheet::' on member 'getLinesSize' [-fpermissive]
int FormalWorkSheet::getLinesSize();
^~~~~~~~~~~~~~~
../qt/MainWindow.cpp: In member function 'void MainWindow::retranslateAction()':
../qt/MainWindow.cpp:430:121: warning: cannot call constructor 'QKeySequence::QKeySequence' directly [-fpermissive]
"<li><b>"+STRCTRL+"+"+QKeySequence::QKeySequence(Qt::Key_Space).toString()+":</b><center>"+tr("donne les complétions possibles de la chaine saisie")+"</center></li>"
^
../qt/MainWindow.cpp:430:121: note: for a function-style cast, remove the redundant '::QKeySequence'
../qt/MainWindow.cpp: In member function 'void MainWindow::clearWorkspace()':
../qt/MainWindow.cpp:524:16: warning: unused variable 'sheet' [-Wunused-variable]
MainSheet* sheet=0;
^~~~~
../qt/MainWindow.cpp: In member function 'bool MainWindow::loadFile(const QString&)':
../qt/MainWindow.cpp:601:7: warning: return-statement with no value, in function returning 'bool' [-fpermissive]
return;
^~~~~~
../qt/MainWindow.cpp: In member function 'bool MainWindow::appendFile(const QString&)':
../qt/MainWindow.cpp:613:7: warning: return-statement with no value, in function returning 'bool' [-fpermissive]
return;
^~~~~~
../qt/MainWindow.cpp: In member function 'bool MainWindow::loadQcasFile(const QString&)':
../qt/MainWindow.cpp:619:9: error: 'qInfo' was not declared in this scope
qInfo()<<"Failed to open: "<<fileName;
^~~~~
../qt/MainWindow.cpp:640:9: warning: unused variable 'tabBeforeLoad' [-Wunused-variable]
int tabBeforeLoad=tabPages->count();
^~~~~~~~~~~~~
../qt/MainWindow.cpp: In member function 'bool MainWindow::loadGiacFile(const QString&)':
../qt/MainWindow.cpp:724:16: warning: unused variable 'g2d' [-Wunused-variable]
GraphWidget * g2d=0;
^~~
../qt/MainWindow.cpp: In member function 'bool MainWindow::askforXcasarchive()':
../qt/MainWindow.cpp:894:3: warning: return-statement with no value, in function returning 'bool' [-fpermissive]
return;
^~~~~~
../qt/MainWindow.cpp: In member function 'void MainWindow::initAutoSave()':
../qt/MainWindow.cpp:1082:9: error: 'qInfo' was not declared in this scope
qInfo()<<"Found automatic saving file"<<autofound;
^~~~~
../qt/MainWindow.cpp: In member function 'bool MainWindow::autoSave()':
../qt/MainWindow.cpp:1132:3: warning: return-statement with no value, in function returning 'bool' [-fpermissive]
return;
^~~~~~
../qt/MainWindow.cpp: In member function 'void MainWindow::evaluateforinsertion(const QString&)':
../qt/MainWindow.cpp:1799:33: warning: unused variable 'id' [-Wunused-variable]
CasManager::warning id=cas->initExpression(&formula);
^~
../qt/MainWindow.cpp: In member function 'void MainWindow::displayXcasHelp(const QString&) const':
../qt/MainWindow.cpp:1887:43: warning: passing 'const QString' as 'this' argument discards qualifiers [-fpermissive]
giac::gen expression(keyWord.remove("?").toStdString(),giac::context0);
^
In file included from /usr/include/QtCore/qobject.h:48:0,
from /usr/include/QtCore/qcoreapplication.h:45,
from /usr/include/QtGui/qapplication.h:45,
from /usr/include/QtGui/QApplication:1,
from ../qt/MainWindow.cpp:20:
/usr/include/QtCore/qstring.h:280:14: note: in call to 'QString& QString::remove(const QString&, Qt::CaseSensitivity)'
QString &remove(const QString &s, Qt::CaseSensitivity cs = Qt::CaseSensitive);
^~~~~~
../qt/MainWindow.cpp: In member function 'QString CommandInfo::displayPage(const QString&) const':
../qt/MainWindow.cpp:2059:9: error: 'qInfo' was not declared in this scope
qInfo()<<command<<"fin de commande\n";
^~~~~
make: *** [Makefile:479: MainWindow.o] Error 1
Also, i need to pass the
-Wno-error=format-security flag for avoiding the error:
Code : Tout sélectionner
g++ -c -pipe -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -mtune=generic -fno-strict-aliasing -Wno-unused-parameter -DGIAC_GENERIC_CONSTANTS -fpermissive -fPIC -Wall -W -D_REENTRANT -DQT_NO_DEBUG -DQT_SVG_LIB -DQT_XML_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/lib64/qt4/mkspecs/linux-g++ -I../../qcas -I/usr/include/QtCore -I/usr/include/QtGui -I/usr/include/QtXml -I/usr/include/QtSvg -I/usr/include -I../../qcas -I../qt -I. -I. -I. -o FormalLineWidgets.o ../qt/gui/FormalLineWidgets.cpp
../qt/gui/qtmmlwidget.cpp: In member function 'void MmlDocument::_dump(const MmlNode*, QString&) const':
../qt/gui/qtmmlwidget.cpp:3190:56: error: format not a string literal and no format arguments [-Werror=format-security]
qWarning((indent + node->toStr()).toLatin1().data());
^
../qt/gui/qtmmlwidget.cpp: In member function 'void MmlDocument::insertOperator(MmlNode*, const QString&)':
../qt/gui/qtmmlwidget.cpp:3397:10: warning: variable 'ok' set but not used [-Wunused-but-set-variable]
bool ok = insertChild(node, mo_node, 0);
^~
../qt/gui/qtmmlwidget.cpp: In member function 'virtual int MmlNode::scriptlevel(const MmlNode*) const':
../qt/gui/qtmmlwidget.cpp:3735:85: error: format not a string literal and no format arguments [-Werror=format-security]
qWarning(("MmlNode::scriptlevel(): bad value " + expl_sl_str).toLatin1().data());
^
../qt/gui/qtmmlwidget.cpp:3751:103: error: format not a string literal and no format arguments [-Werror=format-security]
qWarning(("MmlNode::scriptlevel(): could not parse value: \"" + expl_sl_str + "\"").toLatin1().data());
^
../qt/gui/qtmmlwidget.cpp: In function 'QString decodeEntityValue(QString)':
../qt/gui/qtmmlwidget.cpp:5812:97: error: format not a string literal and no format arguments [-Werror=format-security]
qWarning(("decodeEntityValue(): bad entity literal: \"" + literal + "\"").toLatin1().data());
^
../qt/gui/qtmmlwidget.cpp:5820:97: error: format not a string literal and no format arguments [-Werror=format-security]
qWarning(("decodeEntityValue(): bad entity literal: \"" + literal + "\"").toLatin1().data());
^
../qt/gui/qtmmlwidget.cpp:5828:97: error: format not a string literal and no format arguments [-Werror=format-security]
qWarning(("decodeEntityValue(): bad entity literal: \"" + literal + "\"").toLatin1().data());
^
../qt/gui/qtmmlwidget.cpp:5837:94: error: format not a string literal and no format arguments [-Werror=format-security]
qWarning(("decodeEntityValue(): bad entity literal: \"" + literal + "\"").toLatin1().data());
^
../qt/gui/qtmmlwidget.cpp:5846:94: error: format not a string literal and no format arguments [-Werror=format-security]
qWarning(("decodeEntityValue(): bad entity literal: \"" + literal + "\"").toLatin1().data());
^
../qt/gui/qtmmlwidget.cpp: In member function 'MmlNode* MmlDocument::domToMml(const QDomNode&, bool*, QString*)':
../qt/gui/qtmmlwidget.cpp:3470:6: warning: this statement may fall through [-Wimplicit-fallthrough=]
if (spec->child_spec != child_cnt) {
^~
../qt/gui/qtmmlwidget.cpp:3485:2: note: here
case NodeSpec::ChildAny:
^~~~
cc1plus: some warnings being treated as errors
make: *** [Makefile:550: qtmmlwidget.o] Error 1