diff --git a/CMakeLists.txt b/CMakeLists.txt index 639c988d..3f8aa947 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -10,7 +10,7 @@ set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY build) set(CMAKE_LIBRARY_OUTPUT_DIRECTORY build) set(CMAKE_RUNTIME_OUTPUT_DIRECTORY build) -set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-unused-result") +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-unused-result -Wreturn-type") # We have 2 executable build outputs: appbill and hpcore diff --git a/src/bill/appbill.cpp b/src/bill/appbill.cpp index b17df382..d3b65e32 100644 --- a/src/bill/appbill.cpp +++ b/src/bill/appbill.cpp @@ -459,7 +459,7 @@ int pass_through_mode(int argc, char** argv) { fclose(f); execv(argv[1], argv+1); - + return 128; } diff --git a/src/comm/comm_session.cpp b/src/comm/comm_session.cpp index 85962547..d1b9734d 100644 --- a/src/comm/comm_session.cpp +++ b/src/comm/comm_session.cpp @@ -172,6 +172,7 @@ namespace comm { std::string_view sv(reinterpret_cast(message.data()), message.size()); send(sv); + return 0; } /** @@ -302,7 +303,7 @@ namespace comm writer_thread.join(); LOG_DEBUG << (session_type == SESSION_TYPE::PEER ? "Peer" : "User") << " session closed: " - << uniqueid.substr(0, 10) << (is_inbound ? "[in]" : "[out]") << (is_self ? "[self]" : ""); + << uniqueid.substr(0, 10) << (is_inbound ? "[in]" : "[out]") << (is_self ? "[self]" : ""); } /** diff --git a/src/msg/fbuf/p2pmsg_helpers.cpp b/src/msg/fbuf/p2pmsg_helpers.cpp index d05f555e..10cd8dd2 100644 --- a/src/msg/fbuf/p2pmsg_helpers.cpp +++ b/src/msg/fbuf/p2pmsg_helpers.cpp @@ -298,7 +298,7 @@ namespace msg::fbuf::p2pmsg builder.Finish(message); // Finished building message content to get serialised content. // Now that we have built the content message - create_containermsg_from_content(container_builder, builder, nullptr, false); + create_containermsg_from_content(container_builder, builder, {}, false); } /** @@ -321,7 +321,7 @@ namespace msg::fbuf::p2pmsg // Now that we have built the content message, // we need to sign it and place it inside a container message. - create_containermsg_from_content(container_builder, builder, nullptr, true); + create_containermsg_from_content(container_builder, builder, {}, true); } void create_msg_from_nonunl_proposal(flatbuffers::FlatBufferBuilder &container_builder, const p2p::nonunl_proposal &nup) @@ -338,7 +338,7 @@ namespace msg::fbuf::p2pmsg // Now that we have built the content message, // we need to sign it and place it inside a container message. - create_containermsg_from_content(container_builder, builder, nullptr, false); + create_containermsg_from_content(container_builder, builder, {}, false); } /** @@ -412,7 +412,7 @@ namespace msg::fbuf::p2pmsg // Now that we have built the content message, // we need to sign it and place it inside a container message. - create_containermsg_from_content(container_builder, builder, nullptr, true); + create_containermsg_from_content(container_builder, builder, {}, true); } /** @@ -435,7 +435,7 @@ namespace msg::fbuf::p2pmsg // Now that we have built the content message, // we need to sign it and place it inside a container message. - create_containermsg_from_content(container_builder, builder, nullptr, true); + create_containermsg_from_content(container_builder, builder, {}, true); } /**