static int _parse_error_msg(char *full_err_msg, char **err_name, char **err_msg)
{
- char *save_p, *domain, *_err_name, *_err_msg;
+ char *save_p = NULL, *domain, *_err_name, *_err_msg;
if (!(domain = strtok_r(full_err_msg, ":", &save_p))) {
debug_error("get domain failed");
case VOLUME_TYPE_VOICE:
*volume_type_str = "voice";
break;
+ default:
+ debug_error("unexpected volume type [%d]", volume_type);
+ return MM_ERROR_SOUND_INTERNAL;
}
if (!strncmp(*volume_type_str,"", VOLUME_TYPE_LEN)) {
debug_error("could not find the volume_type[%d] in this switch case statement", volume_type);
debug_error("focus cleaning up failed[0x%x]", err);
return MM_ERROR_POLICY_INTERNAL;
}
- } else if (~(param->session_options & MM_SESSION_OPTION_PAUSE_OTHERS)) {
+ } else if (!(param->session_options & MM_SESSION_OPTION_PAUSE_OTHERS)) {
err = mm_sound_unset_focus_watch_callback(param->focus_wcb_id);
if (err) {
debug_error("focus watch cleaning up failed[0x%x]", err);
debug_error("focus cleaning up failed[0x%x]", err);
return MM_ERROR_POLICY_INTERNAL;
}
- } else if (~(param->session_options & MM_SESSION_OPTION_PAUSE_OTHERS)) {
+ } else if (!(param->session_options & MM_SESSION_OPTION_PAUSE_OTHERS)) {
err = mm_sound_unset_focus_watch_callback(param->focus_wcb_id);
if (err) {
debug_error("focus watch cleaning up failed[0x%x]", err);
err = MM_ERROR_POLICY_INTERNAL;
goto cleanup;
}
- } else if (~(g_slots[slotid].session_options & MM_SESSION_OPTION_PAUSE_OTHERS)) {
+ } else if (!(g_slots[slotid].session_options & MM_SESSION_OPTION_PAUSE_OTHERS)) {
err = mm_sound_unset_focus_watch_callback(g_slots[slotid].focus_wcb_id);
if (err) {
debug_error("mm_sound_unset_focus_watch_callback failed [0x%x]", err);
err = MM_ERROR_POLICY_INTERNAL;
goto finish;
}
- } else if (~(g_slots[param].session_options & MM_SESSION_OPTION_PAUSE_OTHERS)) {
+ } else if (!(g_slots[param].session_options & MM_SESSION_OPTION_PAUSE_OTHERS)) {
err = mm_sound_unset_focus_watch_callback(g_slots[param].focus_wcb_id);
if (err) {
debug_error("mm_sound_unset_focus_watch_callback failed [0x%x]", err);