[Libreoffice-commits] online.git: loolwsd/configure.ac loolwsd/LoadTest.cpp loolwsd/LOOLSession.cpp loolwsd/LOOLWSD.cpp

Miklos Vajna vmiklos at collabora.co.uk
Fri Oct 16 08:45:28 PDT 2015


 loolwsd/LOOLSession.cpp |   32 ++++++++++++++++----------------
 loolwsd/LOOLWSD.cpp     |    6 +++---
 loolwsd/LoadTest.cpp    |    2 +-
 loolwsd/configure.ac    |    2 +-
 4 files changed, 21 insertions(+), 21 deletions(-)

New commits:
commit fed0cbc77c1c103e46105298c4af456a65d514cb
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date:   Fri Oct 16 17:45:03 2015 +0200

    loolwsd: -Werror=unused-parameter

diff --git a/loolwsd/LOOLSession.cpp b/loolwsd/LOOLSession.cpp
index 35ef2d6..f83ab5d 100644
--- a/loolwsd/LOOLSession.cpp
+++ b/loolwsd/LOOLSession.cpp
@@ -370,7 +370,7 @@ Path MasterProcessSession::getJailPath(UInt64 childId)
     return Path::forDirectory(LOOLWSD::childRoot + Path::separator() + std::to_string(childId));
 }
 
-bool MasterProcessSession::invalidateTiles(const char *buffer, int length, StringTokenizer& tokens)
+bool MasterProcessSession::invalidateTiles(const char* /*buffer*/, int /*length*/, StringTokenizer& tokens)
 {
     int part, tilePosX, tilePosY, tileWidth, tileHeight;
 
@@ -393,7 +393,7 @@ bool MasterProcessSession::invalidateTiles(const char *buffer, int length, Strin
     return true;
 }
 
-bool MasterProcessSession::loadDocument(const char *buffer, int length, StringTokenizer& tokens)
+bool MasterProcessSession::loadDocument(const char* /*buffer*/, int /*length*/, StringTokenizer& tokens)
 {
     if (tokens.count() < 2 || tokens.count() > 4)
     {
@@ -912,7 +912,7 @@ bool ChildProcessSession::loadDocument(const char *buffer, int length, StringTok
     return true;
 }
 
-bool ChildProcessSession::getStatus(const char *buffer, int length)
+bool ChildProcessSession::getStatus(const char* /*buffer*/, int /*length*/)
 {
     std::string status = "status: " + LOKitHelper::documentStatus(_loKitDocument);
     StringTokenizer tokens(status, " ", StringTokenizer::TOK_IGNORE_EMPTY | StringTokenizer::TOK_TRIM);
@@ -925,7 +925,7 @@ bool ChildProcessSession::getStatus(const char *buffer, int length)
     return true;
 }
 
-bool ChildProcessSession::getCommandValues(const char *buffer, int length, StringTokenizer& tokens)
+bool ChildProcessSession::getCommandValues(const char* /*buffer*/, int /*length*/, StringTokenizer& tokens)
 {
     std::string command;
     if (tokens.count() != 2 || !getTokenString(tokens[1], "command", command))
@@ -943,7 +943,7 @@ bool ChildProcessSession::getPartPageRectangles(const char* /*buffer*/, int /*le
     return true;
 }
 
-void ChildProcessSession::sendTile(const char *buffer, int length, StringTokenizer& tokens)
+void ChildProcessSession::sendTile(const char* /*buffer*/, int /*length*/, StringTokenizer& tokens)
 {
     int part, width, height, tilePosX, tilePosY, tileWidth, tileHeight;
 
@@ -996,7 +996,7 @@ void ChildProcessSession::sendTile(const char *buffer, int length, StringTokeniz
     sendBinaryFrame(output.data(), output.size());
 }
 
-bool ChildProcessSession::downloadAs(const char *buffer, int length, StringTokenizer& tokens)
+bool ChildProcessSession::downloadAs(const char* /*buffer*/, int /*length*/, StringTokenizer& tokens)
 {
     std::string name, id, format, filterOptions;
     int part;
@@ -1045,7 +1045,7 @@ bool ChildProcessSession::downloadAs(const char *buffer, int length, StringToken
     return true;
 }
 
-bool ChildProcessSession::getTextSelection(const char *buffer, int length, StringTokenizer& tokens)
+bool ChildProcessSession::getTextSelection(const char* /*buffer*/, int /*length*/, StringTokenizer& tokens)
 {
     std::string mimeType;
 
@@ -1062,7 +1062,7 @@ bool ChildProcessSession::getTextSelection(const char *buffer, int length, Strin
     return true;
 }
 
-bool ChildProcessSession::keyEvent(const char *buffer, int length, StringTokenizer& tokens)
+bool ChildProcessSession::keyEvent(const char* /*buffer*/, int /*length*/, StringTokenizer& tokens)
 {
     int type, charcode, keycode;
 
@@ -1082,7 +1082,7 @@ bool ChildProcessSession::keyEvent(const char *buffer, int length, StringTokeniz
     return true;
 }
 
-bool ChildProcessSession::mouseEvent(const char *buffer, int length, StringTokenizer& tokens)
+bool ChildProcessSession::mouseEvent(const char* /*buffer*/, int /*length*/, StringTokenizer& tokens)
 {
     int type, x, y, count, buttons, modifier;
 
@@ -1107,7 +1107,7 @@ bool ChildProcessSession::mouseEvent(const char *buffer, int length, StringToken
     return true;
 }
 
-bool ChildProcessSession::unoCommand(const char *buffer, int length, StringTokenizer& tokens)
+bool ChildProcessSession::unoCommand(const char* /*buffer*/, int /*length*/, StringTokenizer& tokens)
 {
     if (tokens.count() == 1)
     {
@@ -1127,7 +1127,7 @@ bool ChildProcessSession::unoCommand(const char *buffer, int length, StringToken
     return true;
 }
 
-bool ChildProcessSession::selectText(const char *buffer, int length, StringTokenizer& tokens)
+bool ChildProcessSession::selectText(const char* /*buffer*/, int /*length*/, StringTokenizer& tokens)
 {
     int type, x, y;
 
@@ -1149,7 +1149,7 @@ bool ChildProcessSession::selectText(const char *buffer, int length, StringToken
     return true;
 }
 
-bool ChildProcessSession::selectGraphic(const char *buffer, int length, StringTokenizer& tokens)
+bool ChildProcessSession::selectGraphic(const char* /*buffer*/, int /*length*/, StringTokenizer& tokens)
 {
     int type, x, y;
 
@@ -1170,7 +1170,7 @@ bool ChildProcessSession::selectGraphic(const char *buffer, int length, StringTo
     return true;
 }
 
-bool ChildProcessSession::resetSelection(const char *buffer, int length, StringTokenizer& tokens)
+bool ChildProcessSession::resetSelection(const char* /*buffer*/, int /*length*/, StringTokenizer& tokens)
 {
     if (tokens.count() != 1)
     {
@@ -1183,7 +1183,7 @@ bool ChildProcessSession::resetSelection(const char *buffer, int length, StringT
     return true;
 }
 
-bool ChildProcessSession::saveAs(const char *buffer, int length, StringTokenizer& tokens)
+bool ChildProcessSession::saveAs(const char* /*buffer*/, int /*length*/, StringTokenizer& tokens)
 {
     std::string url, format, filterOptions;
 
@@ -1209,7 +1209,7 @@ bool ChildProcessSession::saveAs(const char *buffer, int length, StringTokenizer
     return true;
 }
 
-bool ChildProcessSession::setClientPart(const char *buffer, int length, StringTokenizer& tokens)
+bool ChildProcessSession::setClientPart(const char* /*buffer*/, int /*length*/, StringTokenizer& tokens)
 {
     if (tokens.count() < 2 ||
         !getTokenInteger(tokens[1], "part", _clientPart))
@@ -1219,7 +1219,7 @@ bool ChildProcessSession::setClientPart(const char *buffer, int length, StringTo
     return true;
 }
 
-bool ChildProcessSession::setPage(const char *buffer, int length, StringTokenizer& tokens)
+bool ChildProcessSession::setPage(const char* /*buffer*/, int /*length*/, StringTokenizer& tokens)
 {
     int page;
     if (tokens.count() < 2 ||
diff --git a/loolwsd/LOOLWSD.cpp b/loolwsd/LOOLWSD.cpp
index e198203..528a64e 100644
--- a/loolwsd/LOOLWSD.cpp
+++ b/loolwsd/LOOLWSD.cpp
@@ -652,9 +652,9 @@ namespace
     ThreadLocal<Path> destinationForLinkOrCopy;
 
     int linkOrCopyFunction(const char *fpath,
-                           const struct stat *sb,
+                           const struct stat* /*sb*/,
                            int typeflag,
-                           struct FTW *ftwbuf)
+                           struct FTW* /*ftwbuf*/)
     {
         if (strcmp(fpath, sourceForLinkOrCopy->c_str()) == 0)
             return 0;
@@ -1111,7 +1111,7 @@ void LOOLWSD::startupDesktop(int nDesktops)
     }
 }
 
-int LOOLWSD::main(const std::vector<std::string>& args)
+int LOOLWSD::main(const std::vector<std::string>& /*args*/)
 {
 #ifdef __linux
     char *locale = setlocale(LC_ALL, NULL);
diff --git a/loolwsd/LoadTest.cpp b/loolwsd/LoadTest.cpp
index b146ed2..a1f0442 100644
--- a/loolwsd/LoadTest.cpp
+++ b/loolwsd/LoadTest.cpp
@@ -367,7 +367,7 @@ void LoadTest::displayHelp()
     helpFormatter.format(std::cout);
 }
 
-int LoadTest::main(const std::vector<std::string>& args)
+int LoadTest::main(const std::vector<std::string>& /*args*/)
 {
     Thread *clients[_numClients];
 
diff --git a/loolwsd/configure.ac b/loolwsd/configure.ac
index 86ad875..f3acfb0 100644
--- a/loolwsd/configure.ac
+++ b/loolwsd/configure.ac
@@ -57,7 +57,7 @@ AS_IF([test "$enable_debug" = yes],
 # Test for build environment
 
 CXXFLAGS="$CXXFLAGS -std=c++11"
-CXXFLAGS="$CXXFLAGS -Wall -Werror"
+CXXFLAGS="$CXXFLAGS -Wall -Wextra -Werror"
 
 AS_IF([test -n "$with_lokit_path"],
       [CPPFLAGS="$CPPFLAGS -I${with_lokit_path}"])


More information about the Libreoffice-commits mailing list