Add explicit type casts to suppress -Wformat warnings (#16306)

This commit is contained in:
mogemimi 2016-08-05 10:46:50 +09:00 committed by minggo
parent b135d512d2
commit a5f36e70a5
3 changed files with 7 additions and 7 deletions

View File

@ -219,7 +219,7 @@ int AudioEngineImpl::play2d(const std::string &filePath ,bool loop ,float volume
if (state != IAudioPlayer::State::OVER && state != IAudioPlayer::State::STOPPED) if (state != IAudioPlayer::State::OVER && state != IAudioPlayer::State::STOPPED)
{ {
ALOGV("Ignore state: %d", state); ALOGV("Ignore state: %d", static_cast<int>(state));
return; return;
} }

View File

@ -220,7 +220,7 @@ void AudioMixerController::mixOneFrame()
} }
else else
{ {
ALOGW("Previous state (%d) isn't PAUSED, couldn't resume!", track->getPrevState()); ALOGW("Previous state (%d) isn't PAUSED, couldn't resume!", static_cast<int>(track->getPrevState()));
} }
} }
else if (state == Track::State::PAUSED) else if (state == Track::State::PAUSED)
@ -231,7 +231,7 @@ void AudioMixerController::mixOneFrame()
} }
else else
{ {
ALOGW("Previous state (%d) isn't PLAYING, couldn't pause!", track->getPrevState()); ALOGW("Previous state (%d) isn't PLAYING, couldn't pause!", static_cast<int>(track->getPrevState()));
} }
} }
else if (state == Track::State::STOPPED) else if (state == Track::State::STOPPED)

View File

@ -169,7 +169,7 @@ void UrlAudioPlayer::stop()
} }
else else
{ {
ALOGW("UrlAudioPlayer (%p, state:%d) isn't playing or paused, could not invoke stop!", this, _state); ALOGW("UrlAudioPlayer (%p, state:%d) isn't playing or paused, could not invoke stop!", this, static_cast<int>(_state));
} }
} }
@ -183,7 +183,7 @@ void UrlAudioPlayer::pause()
} }
else else
{ {
ALOGW("UrlAudioPlayer (%p, state:%d) isn't playing, could not invoke pause!", this, _state); ALOGW("UrlAudioPlayer (%p, state:%d) isn't playing, could not invoke pause!", this, static_cast<int>(_state));
} }
} }
@ -197,7 +197,7 @@ void UrlAudioPlayer::resume()
} }
else else
{ {
ALOGW("UrlAudioPlayer (%p, state:%d) isn't paused, could not invoke resume!", this, _state); ALOGW("UrlAudioPlayer (%p, state:%d) isn't paused, could not invoke resume!", this, static_cast<int>(_state));
} }
} }
@ -211,7 +211,7 @@ void UrlAudioPlayer::play()
} }
else else
{ {
ALOGW("UrlAudioPlayer (%p, state:%d) isn't paused or initialized, could not invoke play!", this, _state); ALOGW("UrlAudioPlayer (%p, state:%d) isn't paused or initialized, could not invoke play!", this, static_cast<int>(_state));
} }
} }