summaryrefslogtreecommitdiff
path: root/gnss
diff options
context:
space:
mode:
authorLinux Build Service Account <lnxbuild@localhost>2018-09-16 02:35:30 -0700
committerGerrit - the friendly Code Review server <code-review@localhost>2018-09-16 02:35:30 -0700
commitee2ccdb1721ca4bdb4ee5f112b44848cb78a7eb8 (patch)
treebe10d535ee06a6c4b65ffc70d4b27f514b60f1c4 /gnss
parent5fc1941ef68b4c0b1bd8cffaa3de22a81fb7999e (diff)
parentb81c6d4955dae8b24b972bbcd55315700ace575c (diff)
downloadgps-ee2ccdb1721ca4bdb4ee5f112b44848cb78a7eb8.tar.gz
Merge "Fixed KW issues such as uninitialized variables"
Diffstat (limited to 'gnss')
-rw-r--r--gnss/GnssAdapter.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/gnss/GnssAdapter.cpp b/gnss/GnssAdapter.cpp
index 11d98b2..78f3940 100644
--- a/gnss/GnssAdapter.cpp
+++ b/gnss/GnssAdapter.cpp
@@ -2280,6 +2280,7 @@ GnssAdapter::startTrackingMultiplex(LocationAPI* client, uint32_t sessionId,
// find the smallest interval and powerMode
TrackingOptions multiplexedOptions = {}; // size is 0 until set for the first time
GnssPowerMode multiplexedPowerMode = GNSS_POWER_MODE_INVALID;
+ memset(&multiplexedOptions, 0, sizeof(multiplexedOptions));
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 (0 == multiplexedOptions.size ||
@@ -2470,6 +2471,7 @@ GnssAdapter::updateTrackingMultiplex(LocationAPI* client, uint32_t id,
// find the smallest interval and powerMode, other than the session we are updating
TrackingOptions multiplexedOptions = {}; // size is 0 until set for the first time
GnssPowerMode multiplexedPowerMode = GNSS_POWER_MODE_INVALID;
+ memset(&multiplexedOptions, 0, sizeof(multiplexedOptions));
for (auto it2 = mTrackingSessions.begin(); it2 != mTrackingSessions.end(); ++it2) {
// 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
@@ -2569,6 +2571,7 @@ GnssAdapter::stopTrackingMultiplex(LocationAPI* client, uint32_t id)
// find the smallest interval and powerMode, other than the session we are stopping
TrackingOptions multiplexedOptions = {}; // size is 0 until set for the first time
GnssPowerMode multiplexedPowerMode = GNSS_POWER_MODE_INVALID;
+ memset(&multiplexedOptions, 0, sizeof(multiplexedOptions));
for (auto it2 = mTrackingSessions.begin(); it2 != mTrackingSessions.end(); ++it2) {
// 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
@@ -2873,6 +2876,7 @@ GnssAdapter::reportPositionEvent(const UlpLocation& ulpLocation,
mStatus(status),
mTechMask(techMask),
mMsInWeek(msInWeek) {
+ memset(&mDataNotify, 0, sizeof(mDataNotify));
if (pDataNotify != nullptr) {
mDataNotify = *pDataNotify;
mbIsDataValid = true;