[nostalgia] Enable and fix -Wextra warnings

This commit is contained in:
2019-03-30 17:30:56 -05:00
parent 5afe78d015
commit 23b662c2aa
9 changed files with 22 additions and 24 deletions

View File

@@ -51,7 +51,7 @@ Error model(T *io, TestStruct *obj) {
return err;
}
int main(int argc, char **args) {
int main() {
int err = 0;
QString json;
TestStruct ts = {

View File

@@ -26,7 +26,7 @@ OxFSFile::OxFSFile(PassThroughFS *fs, QString path, OxFSFile *parentItem) {
auto stat = fs->stat(static_cast<const char*>(m_path.toUtf8()));
if (!stat.error) {
if (stat.value.fileType == FileType_Directory) {
fs->ls(m_path.toUtf8(), [&ls](const char *name, ox::InodeId_t inode) {
fs->ls(m_path.toUtf8(), [&ls](const char *name, ox::InodeId_t) {
ls.push_back(name);
return OxError(0);
});
@@ -115,7 +115,7 @@ QString OxFSFile::name() const {
// OxFSModel
OxFSModel::OxFSModel(PassThroughFS *fs, QObject *parent) {
OxFSModel::OxFSModel(PassThroughFS *fs, QObject*) {
m_rootItem = new OxFSFile(fs, "");
}
@@ -213,7 +213,7 @@ void OxFSModel::updateFile(QString path) {
m_rootItem->appendChild(this, pathItems, "");
}
void OxFSModel::setupModelData(const QStringList &lines, OxFSFile *parent) {
void OxFSModel::setupModelData(const QStringList&, OxFSFile*) {
}
}

View File

@@ -11,15 +11,15 @@
namespace nostalgia {
namespace studio {
QVector<WizardMaker> Plugin::newWizards(const Context *ctx) {
QVector<WizardMaker> Plugin::newWizards(const Context*) {
return {};
}
QVector<WizardMaker> Plugin::importWizards(const Context *ctx) {
QVector<WizardMaker> Plugin::importWizards(const Context*) {
return {};
}
QWidget *Plugin::makeEditor(QString path, const Context *ctx) {
QWidget *Plugin::makeEditor(QString, const Context*) {
return nullptr;
}

View File

@@ -190,7 +190,7 @@ QAction *MainWindow::addAction(QMenu *menu, QString text, QString toolTip,
return action;
}
int MainWindow::readState(QString path) {
int MainWindow::readState(QString) {
int err = 0;
QSettings settings(m_profile.orgName, m_profile.appName);
@@ -206,7 +206,7 @@ int MainWindow::readState(QString path) {
return err;
}
int MainWindow::writeState(QString path) {
int MainWindow::writeState(QString) {
int err = 0;
// generate JSON for application specific state info