On Thu, Sep 20, 2012 at 4:05 PM, Scott Kostyshak <skost...@lyx.org> wrote: >> This patch for branch fixes a warning that was fixed on master here: >> ea50cd71f9d >> >> Is it OK? >> >> Scott > > This updated patch fixes another warning on branch, which was also > fixed in master at that commit. > > Scott
Sorry for the multiple emails -- I didn't expect there to be more than one (and then two) warnings on branch. This updated patch fixes another warning that was also fixed in trunk. Is it OK for branch? I am getting one more warning: lyxfind.cpp:568:15: warning: ‘size_t lyx::{anonymous}::find_matching_brace(const string&, size_t)’ defined but not used [-Wunused-function] Should this function be removed? Thanks, Scott
diff --git a/src/Lexer.cpp b/src/Lexer.cpp index d824da0..664e1b9 100644 --- a/src/Lexer.cpp +++ b/src/Lexer.cpp @@ -274,9 +274,9 @@ bool Lexer::Pimpl::setFile(FileName const & filename) // Skip byte order mark. if (is.peek() == 0xef) { - int c = is.get(); + is.get(); if (is.peek() == 0xbb) { - c = is.get(); + is.get(); LASSERT(is.get() == 0xbf, /**/); } else is.unget(); diff --git a/src/Server.cpp b/src/Server.cpp index 7ec096e..09a8734 100644 --- a/src/Server.cpp +++ b/src/Server.cpp @@ -1015,7 +1015,8 @@ bool LyXComm::loadFilesInOtherInstance() break; string const cmd = "LYXCMD:pipe:file-open:" + fname.absFileName() + '\n'; - ::write(pipefd, cmd.c_str(), cmd.length()); + if (::write(pipefd, cmd.c_str(), cmd.length()) < 0) + LYXERR0("Cannot write to pipe!"); ::close(pipefd); ++loaded_files; it = theFilesToLoad().erase(it); diff --git a/src/frontends/qt4/GuiSpellchecker.cpp b/src/frontends/qt4/GuiSpellchecker.cpp index 5dbdbbb..c428807 100644 --- a/src/frontends/qt4/GuiSpellchecker.cpp +++ b/src/frontends/qt4/GuiSpellchecker.cpp @@ -403,9 +403,8 @@ void SpellcheckerWidget::Private::check() docstring_list suggestions; LYXERR(Debug::GUI, "Spellchecker: start check at " << from); - int progress; try { - progress = bv->buffer().spellCheck(from, to, word_lang, suggestions); + bv->buffer().spellCheck(from, to, word_lang, suggestions); } catch (ExceptionMessage const & message) { if (message.type_ == WarningException) { Alert::warning(message.title_, message.details_);