sm6150-common: gps: Implement list empty error code for msg_q
This fixes enum-conversion warning due to implicit type enum casting between linked_list and msg_q which happens only for status -6. Change-Id: I27ba74c4d840b7ba0cb1017d69a30fc25b80d6b9
This commit is contained in:
parent
452ebe1a60
commit
9a20a65141
@ -76,6 +76,8 @@ static msq_q_err_type convert_linked_list_err_type(linked_list_err_type linked_l
|
|||||||
return eMSG_Q_UNAVAILABLE_RESOURCE;
|
return eMSG_Q_UNAVAILABLE_RESOURCE;
|
||||||
case eLINKED_LIST_INSUFFICIENT_BUFFER:
|
case eLINKED_LIST_INSUFFICIENT_BUFFER:
|
||||||
return eMSG_Q_INSUFFICIENT_BUFFER;
|
return eMSG_Q_INSUFFICIENT_BUFFER;
|
||||||
|
case eLINKED_LIST_EMPTY:
|
||||||
|
return eMSG_Q_EMPTY;
|
||||||
|
|
||||||
case eLINKED_LIST_FAILURE_GENERAL:
|
case eLINKED_LIST_FAILURE_GENERAL:
|
||||||
default:
|
default:
|
||||||
@ -298,7 +300,7 @@ msq_q_err_type msg_q_rmv(void* msg_q_data, void** msg_obj)
|
|||||||
if (linked_list_empty(p_msg_q->msg_list)) {
|
if (linked_list_empty(p_msg_q->msg_list)) {
|
||||||
LOC_LOGW("%s: list is empty !!\n", __FUNCTION__);
|
LOC_LOGW("%s: list is empty !!\n", __FUNCTION__);
|
||||||
pthread_mutex_unlock(&p_msg_q->list_mutex);
|
pthread_mutex_unlock(&p_msg_q->list_mutex);
|
||||||
return eLINKED_LIST_EMPTY;
|
return eMSG_Q_EMPTY;
|
||||||
}
|
}
|
||||||
|
|
||||||
rv = convert_linked_list_err_type(linked_list_remove(p_msg_q->msg_list, msg_obj));
|
rv = convert_linked_list_err_type(linked_list_remove(p_msg_q->msg_list, msg_obj));
|
||||||
|
@ -50,6 +50,8 @@ typedef enum
|
|||||||
/**< Failed because an there were not enough resources. */
|
/**< Failed because an there were not enough resources. */
|
||||||
eMSG_Q_INSUFFICIENT_BUFFER = -5,
|
eMSG_Q_INSUFFICIENT_BUFFER = -5,
|
||||||
/**< Failed because an the supplied buffer was too small. */
|
/**< Failed because an the supplied buffer was too small. */
|
||||||
|
eMSG_Q_EMPTY = -6
|
||||||
|
/**< Failed because list is empty. */
|
||||||
}msq_q_err_type;
|
}msq_q_err_type;
|
||||||
|
|
||||||
/*===========================================================================
|
/*===========================================================================
|
||||||
|
Loading…
Reference in New Issue
Block a user