diff options
| author | Elektroschmock <elektroschmock78@googlemail.com> | 2020-11-24 22:48:17 +0100 |
|---|---|---|
| committer | Julian Veit <claymore1298@gmail.com> | 2022-09-05 17:01:43 +0200 |
| commit | c23b23eb167c07b20faea74cc42897dd92a9912e (patch) | |
| tree | ec2336f64d00610bde4d2166a1472dfbe890b494 | |
| parent | c52ef537f87a0a7bf4c3b023b5dcb42ac65aab2f (diff) | |
msm8974-common: gps: Silence some 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, |
