Fix build error due to -Wformat
[platform/core/api/audio-io.git] / src / cpp / CAudioInfo.cpp
index 3429c7e..39e29dc 100644 (file)
@@ -100,7 +100,7 @@ int CAudioInfo::getSampleSize() {
         bytes_in_sample = 2;
         break;
     default:
-        AUDIO_IO_LOGW("As unrecognized sample type %d, let's assume S16_LE", __mSampleType);
+        AUDIO_IO_LOGW("As unrecognized sample type %d, let's assume S16_LE", static_cast<int>(__mSampleType));
         bytes_in_sample = 2;
         break;
     }
@@ -113,7 +113,7 @@ int CAudioInfo::getSampleSize() {
         number_of_channel = 2;
         break;
     default:
-        AUDIO_IO_LOGW("As unrecognized channel %d, let's assume STEREO", __mChannel);
+        AUDIO_IO_LOGW("As unrecognized channel %d, let's assume STEREO", static_cast<int>(__mChannel));
         number_of_channel = 2;
         break;
     }
@@ -124,7 +124,7 @@ int CAudioInfo::getSampleSize() {
 void CAudioInfo::convertAudioType2StreamType(CAudioInfo::EAudioType audioType, char **streamType) {
     if (audioType < CAudioInfo::EAudioType::AUDIO_IN_TYPE_MEDIA || audioType >= CAudioInfo::EAudioType::AUDIO_TYPE_MAX) {
         THROW_ERROR_MSG_FORMAT(CAudioError::EError::ERROR_NOT_SUPPORTED_TYPE,
-                              "The audioType is not supported [audioType:%u]", to_integral(audioType));
+                               "The audioType is not supported [audioType:%u]", to_integral(audioType));
     }
     *streamType = (char *)__STREAM_TYPE_TABLE[(unsigned int)audioType];
     return;