Fixed KW issues such as uninitialized variables
Change-Id: I24093a79fe0befc4484a9538110d44f667d1cbd6 CRs-fixed: 2312583
This commit is contained in:
parent
033a0fa1c6
commit
b81c6d4955
1 changed files with 4 additions and 0 deletions
|
@ -2271,6 +2271,7 @@ GnssAdapter::startTrackingMultiplex(LocationAPI* client, uint32_t sessionId,
|
||||||
// find the smallest interval and powerMode
|
// find the smallest interval and powerMode
|
||||||
TrackingOptions multiplexedOptions = {}; // size is 0 until set for the first time
|
TrackingOptions multiplexedOptions = {}; // size is 0 until set for the first time
|
||||||
GnssPowerMode multiplexedPowerMode = GNSS_POWER_MODE_INVALID;
|
GnssPowerMode multiplexedPowerMode = GNSS_POWER_MODE_INVALID;
|
||||||
|
memset(&multiplexedOptions, 0, sizeof(multiplexedOptions));
|
||||||
for (auto it = mTrackingSessions.begin(); it != mTrackingSessions.end(); ++it) {
|
for (auto it = mTrackingSessions.begin(); it != mTrackingSessions.end(); ++it) {
|
||||||
// if not set or there is a new smallest interval, then set the new interval
|
// if not set or there is a new smallest interval, then set the new interval
|
||||||
if (0 == multiplexedOptions.size ||
|
if (0 == multiplexedOptions.size ||
|
||||||
|
@ -2461,6 +2462,7 @@ GnssAdapter::updateTrackingMultiplex(LocationAPI* client, uint32_t id,
|
||||||
// find the smallest interval and powerMode, other than the session we are updating
|
// find the smallest interval and powerMode, other than the session we are updating
|
||||||
TrackingOptions multiplexedOptions = {}; // size is 0 until set for the first time
|
TrackingOptions multiplexedOptions = {}; // size is 0 until set for the first time
|
||||||
GnssPowerMode multiplexedPowerMode = GNSS_POWER_MODE_INVALID;
|
GnssPowerMode multiplexedPowerMode = GNSS_POWER_MODE_INVALID;
|
||||||
|
memset(&multiplexedOptions, 0, sizeof(multiplexedOptions));
|
||||||
for (auto it2 = mTrackingSessions.begin(); it2 != mTrackingSessions.end(); ++it2) {
|
for (auto it2 = mTrackingSessions.begin(); it2 != mTrackingSessions.end(); ++it2) {
|
||||||
// if session is not the one we are updating and either interval
|
// if session is not the one we are updating and either interval
|
||||||
// is not set or there is a new smallest interval, then set the new interval
|
// is not set or there is a new smallest interval, then set the new interval
|
||||||
|
@ -2560,6 +2562,7 @@ GnssAdapter::stopTrackingMultiplex(LocationAPI* client, uint32_t id)
|
||||||
// find the smallest interval and powerMode, other than the session we are stopping
|
// find the smallest interval and powerMode, other than the session we are stopping
|
||||||
TrackingOptions multiplexedOptions = {}; // size is 0 until set for the first time
|
TrackingOptions multiplexedOptions = {}; // size is 0 until set for the first time
|
||||||
GnssPowerMode multiplexedPowerMode = GNSS_POWER_MODE_INVALID;
|
GnssPowerMode multiplexedPowerMode = GNSS_POWER_MODE_INVALID;
|
||||||
|
memset(&multiplexedOptions, 0, sizeof(multiplexedOptions));
|
||||||
for (auto it2 = mTrackingSessions.begin(); it2 != mTrackingSessions.end(); ++it2) {
|
for (auto it2 = mTrackingSessions.begin(); it2 != mTrackingSessions.end(); ++it2) {
|
||||||
// if session is not the one we are stopping and either interval
|
// if session is not the one we are stopping and either interval
|
||||||
// is not set or there is a new smallest interval, then set the new interval
|
// is not set or there is a new smallest interval, then set the new interval
|
||||||
|
@ -2864,6 +2867,7 @@ GnssAdapter::reportPositionEvent(const UlpLocation& ulpLocation,
|
||||||
mStatus(status),
|
mStatus(status),
|
||||||
mTechMask(techMask),
|
mTechMask(techMask),
|
||||||
mMsInWeek(msInWeek) {
|
mMsInWeek(msInWeek) {
|
||||||
|
memset(&mDataNotify, 0, sizeof(mDataNotify));
|
||||||
if (pDataNotify != nullptr) {
|
if (pDataNotify != nullptr) {
|
||||||
mDataNotify = *pDataNotify;
|
mDataNotify = *pDataNotify;
|
||||||
mbIsDataValid = true;
|
mbIsDataValid = true;
|
||||||
|
|
Loading…
Reference in a new issue