From cf7fdf78bb67cb3806de8e314e3ded889b2220c7 Mon Sep 17 00:00:00 2001 From: Jean-Marc Lasgouttes Date: Tue, 16 Sep 2008 11:33:07 +0000 Subject: [PATCH] fix a bunch of harmless warnings git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@26425 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/LaTeX.cpp | 9 ++++----- src/LaTeX.h | 2 +- src/VCBackend.cpp | 2 +- src/frontends/qt4/GuiHyperlink.cpp | 2 +- src/frontends/qt4/GuiNomencl.cpp | 2 +- src/frontends/qt4/GuiSendto.cpp | 2 +- src/frontends/qt4/GuiView.cpp | 4 ++-- src/insets/InsetNewline.cpp | 5 ++--- src/insets/InsetNewpage.cpp | 11 +++-------- 9 files changed, 16 insertions(+), 23 deletions(-) diff --git a/src/LaTeX.cpp b/src/LaTeX.cpp index 6003772cbb..a96c08dcd3 100644 --- a/src/LaTeX.cpp +++ b/src/LaTeX.cpp @@ -268,10 +268,10 @@ int LaTeX::run(TeXErrors & terr) } FileName const nlofile(changeExtension(file.absFilename(), ".nlo")); if (head.haschanged(nlofile)) - rerun |= runMakeIndexNomencl(file, runparams, ".nlo", ".nls"); + rerun |= runMakeIndexNomencl(file, ".nlo", ".nls"); FileName const glofile(changeExtension(file.absFilename(), ".glo")); if (head.haschanged(glofile)) - rerun |= runMakeIndexNomencl(file, runparams, ".glo", ".gls"); + rerun |= runMakeIndexNomencl(file, ".glo", ".gls"); // run bibtex // if (scanres & UNDEF_CIT || scanres & RERUN || run_bibtex) @@ -343,9 +343,9 @@ int LaTeX::run(TeXErrors & terr) // I am not pretty sure if need this twice. if (head.haschanged(nlofile)) - rerun |= runMakeIndexNomencl(file, runparams, ".nlo", ".nls"); + rerun |= runMakeIndexNomencl(file, ".nlo", ".nls"); if (head.haschanged(glofile)) - rerun |= runMakeIndexNomencl(file, runparams, ".glo", ".gls"); + rerun |= runMakeIndexNomencl(file, ".glo", ".gls"); // 2 // we will only run latex more if the log file asks for it. @@ -411,7 +411,6 @@ bool LaTeX::runMakeIndex(string const & f, OutputParams const & runparams, bool LaTeX::runMakeIndexNomencl(FileName const & file, - OutputParams const & runparams, string const & nlo, string const & nls) { LYXERR(Debug::LATEX, "Running MakeIndex for nomencl."); diff --git a/src/LaTeX.h b/src/LaTeX.h index 25e83e8703..251022639f 100644 --- a/src/LaTeX.h +++ b/src/LaTeX.h @@ -172,7 +172,7 @@ private: std::string const & = std::string()); /// - bool runMakeIndexNomencl(support::FileName const &, OutputParams const &, + bool runMakeIndexNomencl(support::FileName const &, std::string const &, std::string const &); /// diff --git a/src/VCBackend.cpp b/src/VCBackend.cpp index d05e4428ac..3cda4b201d 100644 --- a/src/VCBackend.cpp +++ b/src/VCBackend.cpp @@ -453,7 +453,7 @@ void SVN::scanMaster() } -void SVN::registrer(string const & msg) +void SVN::registrer(string const & /*msg*/) { doVCCommand("svn add -q " + quoteName(onlyFilename(owner_->absFileName())), FileName(owner_->filePath())); diff --git a/src/frontends/qt4/GuiHyperlink.cpp b/src/frontends/qt4/GuiHyperlink.cpp index 58819fd2e0..07fe2c095a 100644 --- a/src/frontends/qt4/GuiHyperlink.cpp +++ b/src/frontends/qt4/GuiHyperlink.cpp @@ -62,7 +62,7 @@ void GuiHyperlink::changed_adaptor() } -void GuiHyperlink::paramsToDialog(InsetCommandParams const & icp) +void GuiHyperlink::paramsToDialog(InsetCommandParams const & /*icp*/) { targetED->setText(toqstr(params_["target"])); nameED->setText(toqstr(params_["name"])); diff --git a/src/frontends/qt4/GuiNomencl.cpp b/src/frontends/qt4/GuiNomencl.cpp index 72eabe1709..fb999eb8ad 100644 --- a/src/frontends/qt4/GuiNomencl.cpp +++ b/src/frontends/qt4/GuiNomencl.cpp @@ -64,7 +64,7 @@ void GuiNomenclature::reject() } -void GuiNomenclature::paramsToDialog(InsetCommandParams const & icp) +void GuiNomenclature::paramsToDialog(InsetCommandParams const & /*icp*/) { prefixED->setText(toqstr(params_["prefix"])); symbolED->setText(toqstr(params_["symbol"])); diff --git a/src/frontends/qt4/GuiSendto.cpp b/src/frontends/qt4/GuiSendto.cpp index 89cd021586..5e29f9b266 100644 --- a/src/frontends/qt4/GuiSendto.cpp +++ b/src/frontends/qt4/GuiSendto.cpp @@ -147,7 +147,7 @@ bool GuiSendTo::initialiseParams(string const &) } -void GuiSendTo::paramsToDialog(Format const * format, QString const & command) +void GuiSendTo::paramsToDialog(Format const * /*format*/, QString const & command) { if (!command.isEmpty()) commandCO->addItem(command); diff --git a/src/frontends/qt4/GuiView.cpp b/src/frontends/qt4/GuiView.cpp index 0101d0cf0b..dbcbd163e0 100644 --- a/src/frontends/qt4/GuiView.cpp +++ b/src/frontends/qt4/GuiView.cpp @@ -379,9 +379,9 @@ bool GuiView::restoreLayout() #endif // Allow the toc and view-source dock widget to be restored if needed. Dialog * tmp; - if (tmp = findOrBuild("toc", true)) + if ((tmp = findOrBuild("toc", true))) tmp->showView(); - if (tmp = findOrBuild("view-source", true)) + if ((tmp = findOrBuild("view-source", true))) tmp->showView(); if (!restoreState(settings.value(key + "/layout").toByteArray(), 0)) diff --git a/src/insets/InsetNewline.cpp b/src/insets/InsetNewline.cpp index b94dd25dbc..5220568d56 100644 --- a/src/insets/InsetNewline.cpp +++ b/src/insets/InsetNewline.cpp @@ -133,10 +133,9 @@ ColorCode InsetNewline::ColorName() const case InsetNewlineParams::LINEBREAK: return Color_pagebreak; break; - default: - return Color_eolmarker; - break; } + // not really useful, but to avoids gcc complaints + return Color_eolmarker; } diff --git a/src/insets/InsetNewpage.cpp b/src/insets/InsetNewpage.cpp index 511fbfb6e7..fae6d699a4 100644 --- a/src/insets/InsetNewpage.cpp +++ b/src/insets/InsetNewpage.cpp @@ -197,22 +197,17 @@ docstring InsetNewpage::insetLabel() const ColorCode InsetNewpage::ColorName() const { switch (params_.kind) { - case InsetNewpageParams::NEWPAGE: - return Color_newpage; - break; case InsetNewpageParams::PAGEBREAK: return Color_pagebreak; break; + case InsetNewpageParams::NEWPAGE: case InsetNewpageParams::CLEARPAGE: - return Color_newpage; - break; case InsetNewpageParams::CLEARDOUBLEPAGE: return Color_newpage; break; - default: - return Color_newpage; - break; } + // not really useful, but to avoids gcc complaints + return Color_newpage; } -- 2.39.5