audio policy: configurable engine: fix dead lock issue

This patch fixes a dead lock issue within configurable engine
of the audio policy. A clear was calling itself in loop instead
of calling clear on its base class.

Change-Id: I9f7c5f6425fbba36e029664ac130cbeafeca4ddf
Signed-off-by: François Gaffie <francois.gaffie@intel.com>
diff --git a/services/audiopolicy/engineconfigurable/src/Collection.h b/services/audiopolicy/engineconfigurable/src/Collection.h
index 8f17b15..b72ded8 100755
--- a/services/audiopolicy/engineconfigurable/src/Collection.h
+++ b/services/audiopolicy/engineconfigurable/src/Collection.h
@@ -47,6 +47,7 @@
 class Collection : public std::map<Key, Element<Key> *>
 {
 private:
+    typedef std::map<Key, Element<Key> *> Base;
     typedef Element<Key> T;
     typedef typename std::map<Key, T *>::iterator CollectionIterator;
     typedef typename std::map<Key, T *>::const_iterator CollectionConstIterator;
@@ -127,7 +128,7 @@
         for (it = (*this).begin(); it != (*this).end(); ++it) {
             delete it->second;
         }
-        (*this).clear();
+        Base::clear();
     }
 
 private:
diff --git a/services/audiopolicy/engineconfigurable/src/Stream.cpp b/services/audiopolicy/engineconfigurable/src/Stream.cpp
index bea2c19..e136982 100755
--- a/services/audiopolicy/engineconfigurable/src/Stream.cpp
+++ b/services/audiopolicy/engineconfigurable/src/Stream.cpp
@@ -65,12 +65,12 @@
 status_t Element<audio_stream_type_t>::setVolumeProfile(Volume::device_category category,
                                                         const VolumeCurvePoints &points)
 {
-    ALOGD("%s: adding volume profile for %s for device category %d, points nb =%d", __FUNCTION__,
+    ALOGD("%s: adding volume profile for %s for device category %d, points nb =%zu", __FUNCTION__,
           getName().c_str(), category, points.size());
     mVolumeProfiles[category] = points;
 
     for (size_t i = 0; i < points.size(); i++) {
-        ALOGV("%s: %s cat=%d curve index =%d Index=%d dBAttenuation=%f",
+        ALOGV("%s: %s cat=%d curve index =%zu Index=%d dBAttenuation=%f",
               __FUNCTION__, getName().c_str(), category, i, points[i].mIndex,
              points[i].mDBAttenuation);
     }