diff options
| author | Elektroschmock <elektroschmock78@googlemail.com> | 2020-11-24 22:48:17 +0100 |
|---|---|---|
| committer | Jeferson Rodrigo de Oliveira <jroliveira.oliveira301@gmail.com> | 2021-08-10 13:00:02 +0200 |
| commit | ff629c637d466742a26003bc5240c6d1a62425e5 (patch) | |
| tree | e8bf1db13e654eff9537a6f956bfc60d519d2c20 | |
| parent | 916610dbafcc1c0b180382140e452f5f4ac0eb42 (diff) | |
msm8916-common: gps: : Silence build warnings
hardware/qcom/gps/msm8084/loc_api/libloc_api_50001/loc_eng_agps.h:46:1: note: did you mean struct here?
hardware/qcom/gps/msm8084/loc_api/libloc_api_50001/loc_eng_agps.cpp:296:5: note: insert '[[fallthrough]];' to silence this warning
hardware/qcom/gps/msm8084/loc_api/libloc_api_50001/loc_eng_agps.cpp:691:21: warning: implicit conversion of NULL constant to 'char' [-Wnull-conversion]
hardware/qcom/gps/msm8084/loc_api/libloc_api_50001/loc_eng_agps.cpp:937:5: note: insert '[[fallthrough]];' to silence this warning
hardware/qcom/gps/msm8084/loc_api/libloc_api_50001/loc_eng_agps.cpp:631:5: warning: field 'mEnforceSingleSubscriber' will be initialized after field 'mServicer'
Change-Id: If73aa752586dc67694485ad045bb22c8067fc5e5
| -rw-r--r-- | gps/loc_api/libloc_api_50001/loc_eng_agps.cpp | 9 | ||||
| -rw-r--r-- | gps/loc_api/libloc_api_50001/loc_eng_agps.h | 3 |
2 files changed, 7 insertions, 5 deletions
diff --git a/gps/loc_api/libloc_api_50001/loc_eng_agps.cpp b/gps/loc_api/libloc_api_50001/loc_eng_agps.cpp index 5016b5c..a7cbb47 100644 --- a/gps/loc_api/libloc_api_50001/loc_eng_agps.cpp +++ b/gps/loc_api/libloc_api_50001/loc_eng_agps.cpp @@ -292,7 +292,7 @@ AgpsState* AgpsReleasedState::onRsrcEvent(AgpsRsrcStatus event, void* data) Notification notification(subscriber, event, false); subscriber->notifyRsrcStatus(notification); } - // break; + [[fallthrough]]; case RSRC_GRANTED: case RSRC_RELEASED: case RSRC_DENIED: @@ -624,12 +624,12 @@ AgpsStateMachine::AgpsStateMachine(servicerType servType, void *cb_func, AGpsExtType type, bool enforceSingleSubscriber) : + mServicer(Servicer :: getServicer(servType, (void *)cb_func)), mStatePtr(new AgpsReleasedState(this)),mType(type), mAPN(NULL), mAPNLen(0), mBearer(AGPS_APN_BEARER_INVALID), - mEnforceSingleSubscriber(enforceSingleSubscriber), - mServicer(Servicer :: getServicer(servType, (void *)cb_func)) + mEnforceSingleSubscriber(enforceSingleSubscriber) { linked_list_init(&mSubscribers); @@ -688,7 +688,7 @@ void AgpsStateMachine::setAPN(const char* apn, unsigned int len) if (NULL != apn) { mAPN = new char[len+1]; memcpy(mAPN, apn, len); - mAPN[len] = NULL; + mAPN[len] = 0; mAPNLen = len; } else { @@ -933,6 +933,7 @@ void DSStateMachine :: onRsrcEvent(AgpsRsrcStatus event) event = RSRC_DENIED; LOC_LOGE(" Switching event to RSRC_DENIED\n"); } + [[fallthrough]]; case RSRC_DENIED: mStatePtr = mStatePtr->onRsrcEvent(event, NULL); break; diff --git a/gps/loc_api/libloc_api_50001/loc_eng_agps.h b/gps/loc_api/libloc_api_50001/loc_eng_agps.h index 2d689ce..000ed77 100644 --- a/gps/loc_api/libloc_api_50001/loc_eng_agps.h +++ b/gps/loc_api/libloc_api_50001/loc_eng_agps.h @@ -267,7 +267,8 @@ public: // each subscriber is a AGPS client. In the case of ATL, there could be // multiple clients from modem. In the case of BIT, there is only one // cilent from BIT daemon. -struct Subscriber { +class Subscriber { +public: const uint32_t ID; const AgpsStateMachine* mStateMachine; inline Subscriber(const int id, |
