File 0001-Fix-return-values-for-functions.patch of Package libopflex

From 214afdc7249d1e54b15339ca4195d09743449fd5 Mon Sep 17 00:00:00 2001
From: Thomas Bechtold <tbechtold@suse.com>
Date: Wed, 20 Apr 2016 17:44:31 +0200
Subject: [PATCH] Fix return values for functions

Fix errors when compiling with CXXFLAGS="-Wreturn-type -Werror". Non
void functions should return something.
---
 libopflex/comms/CommunicationPeer.cpp | 1 +
 libopflex/engine/OpflexHandler.cpp    | 2 ++
 2 files changed, 3 insertions(+)

diff --git a/libopflex/comms/CommunicationPeer.cpp b/libopflex/comms/CommunicationPeer.cpp
index 106e04b..4fccce6 100644
--- a/libopflex/comms/CommunicationPeer.cpp
+++ b/libopflex/comms/CommunicationPeer.cpp
@@ -464,6 +464,7 @@ std::ostream& operator << (
         os << ")";
 
     }
+    return os;
 }
 
 #ifndef NDEBUG
diff --git a/libopflex/engine/OpflexHandler.cpp b/libopflex/engine/OpflexHandler.cpp
index d2948df..b57306e 100644
--- a/libopflex/engine/OpflexHandler.cpp
+++ b/libopflex/engine/OpflexHandler.cpp
@@ -134,12 +134,14 @@ bool OpflexHandler::requireReadyReq(const Value& id,
 
     sendErrorRes(id, "ESTATE", "Unexpected request of type " + method);
     handleUnexpected(method);
+    return false;
 }
 
 bool OpflexHandler::requireReadyRes(uint64_t reqId,
                                     const std::string& method) {
     if (isReady()) return true;
     handleUnexpected(method);
+    return false;
 }
 
 } /* namespace internal */
-- 
2.8.1

openSUSE Build Service is sponsored by