Remove no-non-virtual-dtor flag

BZ: 111473

The warning non-virtual-dtor should not be ignored for the whole project, but
only in the few cases where it it necessary.

Change-Id: I0ede82a30f2cd055b789f7fb56104fb227934e6f
Signed-off-by: Sebastien Gonzalve <sebastien.gonzalve@intel.com>
Signed-off-by: Guilhem IMBERTON <guilhem.imberton@intel.com>
Reviewed-on: http://android.intel.com:8080/110191
Reviewed-by: buildbot <buildbot@intel.com>
Tested-by: buildbot <buildbot@intel.com>
diff --git a/parameter/Android.mk b/parameter/Android.mk
index 02e1048..c4d57e0 100644
--- a/parameter/Android.mk
+++ b/parameter/Android.mk
@@ -100,8 +100,6 @@
 COMMON_MODULE := libparameter
 COMMON_MODULE_TAGS := optional
 
-COMMON_CFLAGS := -Wno-non-virtual-dtor
-
 COMMON_C_INCLUDES := \
     $(LOCAL_PATH)/include/ \
     $(LOCAL_PATH)/../utility/ \
@@ -110,7 +108,6 @@
 
 COMMON_SHARED_LIBRARIES := libicuuc
 COMMON_STATIC_LIBRARIES := libxmlserializer libutility libxml2
-
 #############################
 # Target build
 
diff --git a/parameter/AreaConfiguration.h b/parameter/AreaConfiguration.h
index bcf2229..bb1cc92 100644
--- a/parameter/AreaConfiguration.h
+++ b/parameter/AreaConfiguration.h
@@ -39,6 +39,9 @@
 public:
     CAreaConfiguration(const CConfigurableElement* pConfigurableElement, const CSyncerSet* pSyncerSet);
 
+    /* FIXME this was missing and probably buggy*/
+    virtual ~CAreaConfiguration() {}
+
     // Save data from current
     void save(const CParameterBlackboard* pMainBlackboard);
 
diff --git a/parameter/BackSynchronizer.h b/parameter/BackSynchronizer.h
index 2c3cdac..793c687 100644
--- a/parameter/BackSynchronizer.h
+++ b/parameter/BackSynchronizer.h
@@ -38,10 +38,12 @@
 
     // Back synchronization
     virtual void sync() = 0;
+    virtual ~CBackSynchronizer() {}
 
 protected:
     // Aggegate list
     list<const CConfigurableElement*> _needingBackSyncList;
+
 private:
     // Aggegator
     CConfigurableElementAggregator _configurableElementAggregator;
diff --git a/parameter/Mapper.h b/parameter/Mapper.h
index 8bf7223..1d2dd22 100644
--- a/parameter/Mapper.h
+++ b/parameter/Mapper.h
@@ -35,4 +35,7 @@
 public:
     virtual bool mapBegin(CInstanceConfigurableElement* pInstanceConfigurableElement, bool& bKeepDiving, string& strError) = 0;
     virtual void mapEnd() = 0;
+
+protected:
+    virtual ~IMapper() {}
 };
diff --git a/parameter/ParameterMgr.h b/parameter/ParameterMgr.h
index fa12128..0d7119d 100644
--- a/parameter/ParameterMgr.h
+++ b/parameter/ParameterMgr.h
@@ -92,6 +92,8 @@
     {
     public:
         virtual void log(bool bIsWarning, const std::string& strLog) = 0;
+    protected:
+        virtual ~ILogger() {}
     };
 
     // Construction
diff --git a/parameter/SubsystemObjectCreator.h b/parameter/SubsystemObjectCreator.h
index 0b55a57..98e4079 100644
--- a/parameter/SubsystemObjectCreator.h
+++ b/parameter/SubsystemObjectCreator.h
@@ -43,6 +43,8 @@
     // Object creation
     virtual CSubsystemObject* objectCreate(const string& strMappingValue, CInstanceConfigurableElement* pInstanceConfigurableElement, const CMappingContext& context) const = 0;
 
+    virtual ~CSubsystemObjectCreator() {}
+
 private:
     // Mapping key
     string _strMappingKey;
diff --git a/parameter/Syncer.h b/parameter/Syncer.h
index 0b830a8..b1632e8 100644
--- a/parameter/Syncer.h
+++ b/parameter/Syncer.h
@@ -34,4 +34,7 @@
 {
 public:
     virtual bool sync(CParameterBlackboard& parameterBlackboard, bool bBack, string& strError) = 0;
+
+protected:
+    virtual ~ISyncer() {}
 };
diff --git a/parameter/include/ParameterMgrPlatformConnector.h b/parameter/include/ParameterMgrPlatformConnector.h
index 64394e4..ae3e216 100644
--- a/parameter/include/ParameterMgrPlatformConnector.h
+++ b/parameter/include/ParameterMgrPlatformConnector.h
@@ -38,6 +38,8 @@
     {
     public:
         virtual void log(bool bIsWarning, const std::string& strLog) = 0;
+    protected:
+        virtual ~ILogger() {}
     };
 
     // Construction
diff --git a/parameter/include/SelectionCriterionInterface.h b/parameter/include/SelectionCriterionInterface.h
index 9162486..fe5301f 100644
--- a/parameter/include/SelectionCriterionInterface.h
+++ b/parameter/include/SelectionCriterionInterface.h
@@ -32,4 +32,7 @@
     virtual int getCriterionState() const = 0;
     virtual std::string getCriterionName() const = 0;
     virtual const ISelectionCriterionTypeInterface* getCriterionType() const = 0;
+
+protected:
+    virtual ~ISelectionCriterionInterface() {}
 };
diff --git a/parameter/include/SelectionCriterionTypeInterface.h b/parameter/include/SelectionCriterionTypeInterface.h
index 426d355..7d631d1 100644
--- a/parameter/include/SelectionCriterionTypeInterface.h
+++ b/parameter/include/SelectionCriterionTypeInterface.h
@@ -31,5 +31,8 @@
     virtual bool getLiteralValue(int iValue, std::string& strValue) const = 0;
     virtual bool isTypeInclusive() const = 0;
     virtual std::string getFormattedState(int iValue) const = 0;
+
+protected:
+    virtual ~ISelectionCriterionTypeInterface() {}
 };
 
diff --git a/remote-process/Android.mk b/remote-process/Android.mk
index dbdf6b5..8330e0a 100644
--- a/remote-process/Android.mk
+++ b/remote-process/Android.mk
@@ -9,7 +9,6 @@
 COMMON_MODULE := remote-process
 COMMON_MODULE_TAGS := optional
 
-COMMON_CFLAGS := -Wno-non-virtual-dtor
 
 COMMON_C_INCLUDES := \
     $(LOCAL_PATH)/../remote-processor/
@@ -27,7 +26,6 @@
 LOCAL_MODULE_TAGS := $(COMMON_MODULE_TAGS)
 
 LOCAL_CFLAGS += $(COMMON_CFLAGS)
-
 LOCAL_C_INCLUDES += \
     $(COMMON_C_INCLUDES) \
     external/stlport/stlport/ \
diff --git a/remote-processor/Android.mk b/remote-processor/Android.mk
index 7da064a..2a79297 100644
--- a/remote-processor/Android.mk
+++ b/remote-processor/Android.mk
@@ -16,10 +16,7 @@
 COMMON_MODULE := libremote-processor
 COMMON_MODULE_TAGS := optional
 
-COMMON_CFLAGS := -Wno-non-virtual-dtor
-
 COMMON_LDLIBS := -lpthread
-
 #############################
 # Target build
 
diff --git a/remote-processor/RemoteCommand.h b/remote-processor/RemoteCommand.h
index df3d5a4..ffcbcfc 100644
--- a/remote-processor/RemoteCommand.h
+++ b/remote-processor/RemoteCommand.h
@@ -38,4 +38,7 @@
     virtual uint32_t getArgumentCount() const = 0;
     virtual const std::string& getArgument(uint32_t uiArgument) const = 0;
     virtual const std::string packArguments(uint32_t uiStartArgument, uint32_t uiNbArguments) const = 0;
+
+protected:
+    virtual ~IRemoteCommand() {}
 };
diff --git a/remote-processor/RemoteCommandHandler.h b/remote-processor/RemoteCommandHandler.h
index 97aa04f..fcd98a9 100644
--- a/remote-processor/RemoteCommandHandler.h
+++ b/remote-processor/RemoteCommandHandler.h
@@ -32,4 +32,7 @@
 public:
     // Return true on success, fill result in any cases
     virtual bool remoteCommandProcess(const IRemoteCommand& remoteCommand, std::string& strResult) = 0;
+
+protected:
+    virtual ~IRemoteCommandHandler() {}
 };
diff --git a/remote-processor/RemoteCommandHandlerTemplate.h b/remote-processor/RemoteCommandHandlerTemplate.h
index 5d9817e..6223b9c 100644
--- a/remote-processor/RemoteCommandHandlerTemplate.h
+++ b/remote-processor/RemoteCommandHandlerTemplate.h
@@ -217,3 +217,4 @@
     std::vector<CRemoteCommandParserItem*> _remoteCommandParserVector;
     uint32_t _uiMaxCommandUsageLength;
 };
+
diff --git a/remote-processor/RemoteProcessorServerInterface.h b/remote-processor/RemoteProcessorServerInterface.h
index 11ceb10..fdc97cc 100644
--- a/remote-processor/RemoteProcessorServerInterface.h
+++ b/remote-processor/RemoteProcessorServerInterface.h
@@ -34,4 +34,7 @@
     virtual bool start() = 0;
     virtual void stop() = 0;
     virtual bool isStarted() const = 0;
+
+    /* FIXME this was missing but is explicitly called */
+    virtual ~IRemoteProcessorServerInterface() {}
 };
diff --git a/test/test-platform/Android.mk b/test/test-platform/Android.mk
index 845607f..759af73 100644
--- a/test/test-platform/Android.mk
+++ b/test/test-platform/Android.mk
@@ -10,14 +10,11 @@
 COMMON_MODULE := test-platform
 COMMON_MODULE_TAGS := optional
 
-COMMON_CFLAGS := -Wno-non-virtual-dtor
-
 COMMON_C_INCLUDES := \
     $(LOCAL_PATH)/../../parameter/include \
     $(LOCAL_PATH)/../../remote-processor/
 
 COMMON_SHARED_LIBRARIES := libparameter libremote-processor
-
 #############################
 # Target build
 
diff --git a/test/test-platform/TestPlatform.cpp b/test/test-platform/TestPlatform.cpp
index 60ee644..91b86fd 100644
--- a/test/test-platform/TestPlatform.cpp
+++ b/test/test-platform/TestPlatform.cpp
@@ -49,7 +49,6 @@
     }
 };
 
-
 CTestPlatform::CTestPlatform(const string& strClass, int iPortNumber) :
     _pParameterMgrPlatformConnector(new CParameterMgrPlatformConnector(strClass)),
     _pParameterMgrPlatformConnectorLogger(new CParameterMgrPlatformConnectorLogger)
diff --git a/xmlserializer/Android.mk b/xmlserializer/Android.mk
index 6d2770c..8ddb700 100644
--- a/xmlserializer/Android.mk
+++ b/xmlserializer/Android.mk
@@ -18,8 +18,6 @@
 
 COMMON_MODULE_TAGS := optional
 
-COMMON_CFLAGS := -Wno-non-virtual-dtor
-
 COMMON_C_INCLUDES := \
     external/libxml2/include/ \
     external/webkit/Source/WebCore/icu/ \
diff --git a/xmlserializer/XmlDocSink.h b/xmlserializer/XmlDocSink.h
index e1b2fc3..d341ecf 100644
--- a/xmlserializer/XmlDocSink.h
+++ b/xmlserializer/XmlDocSink.h
@@ -34,6 +34,7 @@
 
     // Source processing
     bool process(CXmlDocSource& xmlDocSource, CXmlSerializingContext& serializingContext);
+    virtual ~CXmlDocSink() {}
 
 private:
     // Handle for subclasses to process the source
diff --git a/xmlserializer/XmlSink.h b/xmlserializer/XmlSink.h
index 0d09a1d..dfa0686 100644
--- a/xmlserializer/XmlSink.h
+++ b/xmlserializer/XmlSink.h
@@ -31,4 +31,7 @@
 {
 public:
     virtual bool fromXml(const CXmlElement& xmlElement, CXmlSerializingContext& serializingContext) = 0;
+
+protected:
+    virtual ~IXmlSink() {}
 };
diff --git a/xmlserializer/XmlSource.h b/xmlserializer/XmlSource.h
index 818298d..1a7c52e 100644
--- a/xmlserializer/XmlSource.h
+++ b/xmlserializer/XmlSource.h
@@ -31,4 +31,7 @@
 {
 public:
     virtual void toXml(CXmlElement& xmlElement, CXmlSerializingContext& serializingContext) const = 0;
+
+protected:
+    virtual ~IXmlSource() {}
 };