Comment out set but otherwise unused variables.

g++ warns about this, which we treat as an error.
This commit is contained in:
sawinglogz 2020-01-31 17:18:01 -05:00
parent 4ba711396e
commit 39e243a36d
2 changed files with 22 additions and 22 deletions

View File

@ -118,15 +118,15 @@ Session* DreemLoader::readNextSession()
Session* sess = nullptr;
QDateTime start_time, stop_time;
int sleep_onset, sleep_duration;
int sleep_onset; //, sleep_duration;
int light_sleep_duration, deep_sleep_duration, rem_duration, awakened_duration;
int awakenings, position_changes; // average_hr, average_rr;
int awakenings; //, position_changes, average_hr, average_rr;
float sleep_efficiency;
QStringList hypnogram;
QHash<QString,QString> row;
while (csv->readRow(row)) {
SessionID sid;
SessionID sid = 0;
invalid_fields = false;
start_time = readDateTime(row["Start Time"]);
@ -135,18 +135,18 @@ Session* DreemLoader::readNextSession()
if (mach->SessionExists(sid)) {
continue;
}
}
} // else invalid_fields will be true
// "Type" always seems to be "night"
stop_time = readDateTime(row["Stop Time"]);
sleep_onset = readDuration(row["Sleep Onset Duration"]);
sleep_duration = readDuration(row["Sleep Duration"]);
//sleep_duration = readDuration(row["Sleep Duration"]);
light_sleep_duration = readDuration(row["Light Sleep Duration"]);
deep_sleep_duration = readDuration(row["Deep Sleep Duration"]);
rem_duration = readDuration(row["REM Duration"]);
awakened_duration = readDuration(row["Wake After Sleep Onset Duration"]);
awakenings = readInt(row["Number of awakenings"]);
position_changes = readInt(row["Position Changes"]);
//position_changes = readInt(row["Position Changes"]);
//average_hr = readInt(row["Mean Heart Rate"]); // TODO: sometimes "None"
//average_rr = readInt(row["Mean Respiration CPM"]);
// "Number of Stimulations" is 0 for US models

View File

@ -157,20 +157,20 @@ Session* ZEOLoader::readNextSession()
return nullptr;
}
Session* sess = nullptr;
QDateTime start_of_night, end_of_night, rise_time;
SessionID sid;
QDateTime start_of_night; //, end_of_night, rise_time;
qint64 st, tt;
int stage;
int ZQ, TimeToZ, TimeInWake, TimeInREM, TimeInLight, TimeInDeep, Awakenings;
int MorningFeel;
QString FirmwareVersion, MyZeoVersion;
QDateTime FirstAlarmRing, LastAlarmRing, FirstSnoozeTime, LastSnoozeTime, SetAlarmTime;
QStringList SG, DSG;
//QString FirmwareVersion, MyZeoVersion;
//QDateTime FirstAlarmRing, LastAlarmRing, FirstSnoozeTime, LastSnoozeTime, SetAlarmTime;
QStringList /*SG,*/ DSG;
QHash<QString,QString> row;
while (csv->readRow(row)) {
SessionID sid = 0;
invalid_fields = false;
start_of_night = readDateTime(row["Start of Night"]);
@ -179,7 +179,7 @@ Session* ZEOLoader::readNextSession()
if (mach->SessionExists(sid)) {
continue;
}
}
} // else invalid_fields will be true
ZQ = readInt(row["ZQ"]);
TimeToZ = readInt(row["Time to Z"]);
@ -188,22 +188,22 @@ Session* ZEOLoader::readNextSession()
TimeInLight = readInt(row["Time in Light"]);
TimeInDeep = readInt(row["Time in Deep"]);
Awakenings = readInt(row["Awakenings"]);
end_of_night = readDateTime(row["End of Night"]);
rise_time = readDateTime(row["Rise Time"]);
FirstAlarmRing = readDateTime(row["First Alarm Ring"], false);
LastAlarmRing = readDateTime(row["Last Alarm Ring"], false);
FirstSnoozeTime = readDateTime(row["First Snooze Time"], false);
LastSnoozeTime = readDateTime(row["Last Snooze Time"], false);
SetAlarmTime = readDateTime(row["Set Alarm Time"], false);
//end_of_night = readDateTime(row["End of Night"]);
//rise_time = readDateTime(row["Rise Time"]);
//FirstAlarmRing = readDateTime(row["First Alarm Ring"], false);
//LastAlarmRing = readDateTime(row["Last Alarm Ring"], false);
//FirstSnoozeTime = readDateTime(row["First Snooze Time"], false);
//LastSnoozeTime = readDateTime(row["Last Snooze Time"], false);
//SetAlarmTime = readDateTime(row["Set Alarm Time"], false);
MorningFeel = readInt(row["Morning Feel"], false);
FirmwareVersion = row["Firmware Version"];
MyZeoVersion = row["My ZEO Version"];
//FirmwareVersion = row["Firmware Version"];
//MyZeoVersion = row["My ZEO Version"];
if (invalid_fields) {
continue;
}
SG = row["Sleep Graph"].trimmed().split(" ");
//SG = row["Sleep Graph"].trimmed().split(" ");
DSG = row["Detailed Sleep Graph"].trimmed().split(" ");
if (DSG.size() == 0) {