aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoshan Pius <rpius@google.com>2015-09-28 15:25:40 -0700
committerRoshan Pius <rpius@google.com>2015-09-29 16:39:55 +0000
commite6e02e397e643cfabf0f4e2f54cc61ad6e0ac517 (patch)
tree83e17dac67745cf31d44404c85d145ae8dd6f16a
parent4e2ea8184cc1f9609f1f1251394316629a108a78 (diff)
downloadxmlrpcpp-e6e02e397e643cfabf0f4e2f54cc61ad6e0ac517.tar.gz
xmlrpcpp: Fix compilation warnings and use clang/rtti.
1. Fix couple of compiler warning generated by xmlrpcpp library. 2. Enable RTTI and CLANG in the makefile to be in line with Shill test proxy compilation flags. The test proxy needs RTTI enabled since it uses libchromeos which has has a few modules with RTTI features. So, this leads to "undefined reference to type_info" linker errors when linking against this xmlrpcpp library. BUG: 24335496 Change-Id: Ieccdf577d04853e51933d25b774a6ef9fe2e7541 TEST: mmm external/xmlrpcpp
-rw-r--r--Android.mk6
-rw-r--r--src/XmlRpcServer.cpp4
-rw-r--r--src/base64.h2
-rw-r--r--test/Android.mk8
4 files changed, 13 insertions, 7 deletions
diff --git a/Android.mk b/Android.mk
index ae23d3c..defa384 100644
--- a/Android.mk
+++ b/Android.mk
@@ -4,13 +4,15 @@ ifeq ($(HOST_OS), linux)
include $(CLEAR_VARS)
LOCAL_MODULE := libxmlrpc++
+LOCAL_CLANG := true
+LOCAL_RTTI_FLAG := -frtti
LOCAL_CPPFLAGS := -Wall -fexceptions
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/src
xmlrpc_src_files := \
- $(wildcard $(LOCAL_PATH)/src/*.cpp)
+ $(wildcard $(LOCAL_PATH)/src/*.cpp)
LOCAL_SRC_FILES := \
- $(xmlrpc_src_files:$(LOCAL_PATH)/%=%)
+ $(xmlrpc_src_files:$(LOCAL_PATH)/%=%)
include $(BUILD_SHARED_LIBRARY)
endif # HOST_OS == linux
diff --git a/src/XmlRpcServer.cpp b/src/XmlRpcServer.cpp
index f6b4aa5..4b1044e 100644
--- a/src/XmlRpcServer.cpp
+++ b/src/XmlRpcServer.cpp
@@ -132,7 +132,7 @@ XmlRpcServer::work(double msTime)
// Handle input on the server socket by accepting the connection
// and reading the rpc request.
unsigned
-XmlRpcServer::handleEvent(unsigned mask)
+XmlRpcServer::handleEvent(unsigned /* mask */)
{
acceptConnection();
return XmlRpcDispatch::ReadableEvent; // Continue to monitor this fd
@@ -209,7 +209,7 @@ class ListMethods : public XmlRpcServerMethod
public:
ListMethods(XmlRpcServer* s) : XmlRpcServerMethod(LIST_METHODS, s) {}
- void execute(XmlRpcValue& params, XmlRpcValue& result)
+ void execute(XmlRpcValue& /* params */, XmlRpcValue& result)
{
_server->listMethods(result);
}
diff --git a/src/base64.h b/src/base64.h
index f1e08bc..770c09e 100644
--- a/src/base64.h
+++ b/src/base64.h
@@ -153,7 +153,7 @@ public:
template<class _II, class _OI, class _State, class _Endline>
- _II put(_II _First, _II _Last, _OI _To, _State& _St, _Endline _Endl) const
+ _II put(_II _First, _II _Last, _OI _To, _State& /* _St */, _Endline /* _Endl */) const
{
three2four _3to4;
int line_octets = 0;
diff --git a/test/Android.mk b/test/Android.mk
index accde21..a4c4140 100644
--- a/test/Android.mk
+++ b/test/Android.mk
@@ -4,25 +4,29 @@ ifeq ($(HOST_OS), linux)
include $(CLEAR_VARS)
LOCAL_MODULE := libxmlrpc++-tests-helloserver
+LOCAL_CLANG := true
+LOCAL_RTTI_FLAG := -frtti
LOCAL_CPPFLAGS := -Wall -fexceptions
LOCAL_C_INCLUDES = $(LOCAL_PATH)/../src
LOCAL_SHARED_LIBRARIES := libxmlrpc++
xmlrpc_test_files := $(LOCAL_PATH)/HelloServer.cpp
LOCAL_SRC_FILES := \
- $(xmlrpc_test_files:$(LOCAL_PATH)/%=%)
+ $(xmlrpc_test_files:$(LOCAL_PATH)/%=%)
include $(BUILD_EXECUTABLE)
include $(CLEAR_VARS)
LOCAL_MODULE := libxmlrpc++-tests-helloclient
+LOCAL_CLANG := true
+LOCAL_RTTI_FLAG := -frtti
LOCAL_CPPFLAGS := -Wall -fexceptions
LOCAL_C_INCLUDES = $(LOCAL_PATH)/../src
LOCAL_SHARED_LIBRARIES := libxmlrpc++
xmlrpc_test_files := $(LOCAL_PATH)/HelloClient.cpp
LOCAL_SRC_FILES := \
- $(xmlrpc_test_files:$(LOCAL_PATH)/%=%)
+ $(xmlrpc_test_files:$(LOCAL_PATH)/%=%)
include $(BUILD_EXECUTABLE)
endif # HOST_OS == linux