FIX Compilation Issues with uBuntu24.04 and Clang compiler

This commit is contained in:
LoudSnorer 2024-07-27 12:06:02 -04:00
parent fa725e3d14
commit 56f815d44a
9 changed files with 16 additions and 39 deletions

View File

@ -462,7 +462,6 @@ void RecalcMAP::updateSpanData(int &currentLoc, int & currentEL,int& currentData
void RecalcMAP::updateEventsChannel(Session*sess,ChannelID chanId, QVector<int> &dataArray, PressureInfo & info ) void RecalcMAP::updateEventsChannel(Session*sess,ChannelID chanId, QVector<int> &dataArray, PressureInfo & info )
{ {
this->chanId=chanId; this->chanId=chanId;
int qtyEvents=0;
EventDataType duration = 0, gain; EventDataType duration = 0, gain;
qint64 t , start; qint64 t , start;
@ -502,7 +501,6 @@ void RecalcMAP::updateEventsChannel(Session*sess,ChannelID chanId, QVector<int>
if (ts>maxx) continue; if (ts>maxx) continue;
if (ts<minx) ts=minx; if (ts<minx) ts=minx;
if (t>maxx) t=maxx; if (t>maxx) t=maxx;
qtyEvents++;
updateSpanData(currentLoc , currentEL , currentData , ts , t , dataArray , info ) ; updateSpanData(currentLoc , currentEL , currentData , ts , t , dataArray , info ) ;
} else { } else {
if (t>maxx) continue; if (t>maxx) continue;

View File

@ -1413,7 +1413,6 @@ bool gGraphView::renderGraphs(QPainter &painter)
// Calculate the height of pinned graphs // Calculate the height of pinned graphs
float pinned_height = 0; // pixel height total float pinned_height = 0; // pixel height total
int pinned_graphs = 0; // count
bool showTitle=!AppSetting->disableDailyGraphTitles(); bool showTitle=!AppSetting->disableDailyGraphTitles();
bool dailyGraph= mainwin->getDaily()->graphView() == this; bool dailyGraph= mainwin->getDaily()->graphView() == this;
@ -1435,7 +1434,6 @@ bool gGraphView::renderGraphs(QPainter &painter)
h = g->height() * m_scaleY; h = g->height() * m_scaleY;
pinned_height += h + graphSpacer; pinned_height += h + graphSpacer;
pinned_graphs++;
} }
py += pinned_height; // start drawing at the end of pinned space py += pinned_height; // start drawing at the end of pinned space

View File

@ -468,11 +468,8 @@ void gOverviewGraph::paint(QPainter &painter, gGraph &w, const QRegion &region)
l_height = height; l_height = height;
float py; float py;
EventDataType total; EventDataType total;
int daynum = 0;
EventDataType h, tmp; EventDataType h, tmp;
l_offset = (minx) % 86400000L; l_offset = (minx) % 86400000L;
offset = float(l_offset) / 86400000.0; offset = float(l_offset) / 86400000.0;
@ -559,7 +556,6 @@ void gOverviewGraph::paint(QPainter &painter, gGraph &w, const QRegion &region)
float compliance_hours = 0; float compliance_hours = 0;
int incompliant = 0;
Day *day; Day *day;
EventDataType hours; EventDataType hours;
@ -725,7 +721,6 @@ void gOverviewGraph::paint(QPainter &painter, gGraph &w, const QRegion &region)
if (type == ST_HOURS) { if (type == ST_HOURS) {
if (tmp < compliance_hours) { if (tmp < compliance_hours) {
col = QColor("#f04040"); col = QColor("#f04040");
incompliant++;
} else if (summary_only) { } else if (summary_only) {
col = summaryColor; col = summaryColor;
} }
@ -834,10 +829,6 @@ void gOverviewGraph::paint(QPainter &painter, gGraph &w, const QRegion &region)
lastdaygood = true; lastdaygood = true;
// if (Q>maxx+extra) break; // if (Q>maxx+extra) break;
} else { } else {
if (Q < maxx) {
incompliant++;
}
lastdaygood = false; lastdaygood = false;
} }
@ -849,8 +840,6 @@ jumpnext:
px += barw; px += barw;
daynum++;
//lastQ=Q;
} }
painter.setClipping(false); painter.setClipping(false);

View File

@ -1498,7 +1498,7 @@ int calcSPO2Drop(Session *session)
//qint64 rtime[ringsize]={0}; //qint64 rtime[ringsize]={0};
//int rp=0; //int rp=0;
int min; int min;
int cnt = 0; // int cnt = 0;
// tmp = 0; // tmp = 0;
qint64 start = 0; qint64 start = 0;
@ -1520,7 +1520,7 @@ int calcSPO2Drop(Session *session)
if (time > start + 3600000) { break; } // just look at the first hour if (time > start + 3600000) { break; } // just look at the first hour
// tmp += val; // tmp += val;
cnt++; // cnt++;
} }
} }
@ -1551,7 +1551,8 @@ int calcSPO2Drop(Session *session)
if (!current) { continue; } if (!current) { continue; }
time = el->time(i); time = el->time(i);
/*ring[rp]=val; /*
ring[rp]=val;
rtime[rp]=time; rtime[rp]=time;
rp++; rp++;
rp=rp % ringsize; rp=rp % ringsize;
@ -1572,7 +1573,8 @@ int calcSPO2Drop(Session *session)
if (!cnt) { if (!cnt) {
unsigned j=abs((rp-1) % ringsize); unsigned j=abs((rp-1) % ringsize);
tmp=(ring[j]+val)/2; tmp=(ring[j]+val)/2;
} else tmp/=EventDataType(cnt); */ } else tmp/=EventDataType(cnt);
*/
val = baseline; val = baseline;
lastt = 0; lastt = 0;

View File

@ -388,9 +388,7 @@ bool Journal::RestoreJournal(QString filename)
QDate first = p_profile->FirstDay(); QDate first = p_profile->FirstDay();
QDate last = p_profile->LastDay(); QDate last = p_profile->LastDay();
QDate current = QDate::currentDate(); QDate current = QDate::currentDate();
int error=0; //int used=0;
int ignored=0;
int used=0;
for (int idx=0 ; idx < days.size() ; idx++) { for (int idx=0 ; idx < days.size() ; idx++) {
QDomElement dayElement = days.at(idx).toElement(); QDomElement dayElement = days.at(idx).toElement();
@ -401,23 +399,19 @@ bool Journal::RestoreJournal(QString filename)
date = newdate; date = newdate;
} }
if (!date.isValid()) { if (!date.isValid()) {
error++ ;
continue; continue;
} }
if (date < first) { if (date < first) {
ignored++ ;
continue; continue;
} }
if (date > last) { if (date > last) {
ignored++ ;
continue; continue;
} }
if (date > current) { if (date > current) {
error++ ;
continue; continue;
} }
if ( RestoreDay(dayElement,date,filename) ) { if ( RestoreDay(dayElement,date,filename) ) {
used++; //used++;
} }
} }
double user_height_cm = p_profile->user->height(); double user_height_cm = p_profile->user->height();

View File

@ -688,6 +688,8 @@ bool SleepStyleLoader::OpenSummary(Machine *mach, const QString & filename)
if (ts == 0xffffffff) { if (ts == 0xffffffff) {
#ifdef DEBUGSS #ifdef DEBUGSS
qDebug() << "SS SUM 0xffffffff terminator found at block" << nblock; qDebug() << "SS SUM 0xffffffff terminator found at block" << nblock;
#else
Q_UNUSED(nblock);
#endif #endif
break; break;
} }
@ -996,6 +998,8 @@ bool SleepStyleLoader::OpenDetail(Machine *mach, const QString & filename)
#ifdef DEBUGSS #ifdef DEBUGSS
qDebug() << "SS DET pressure events" << PR->count() << "prSessVount" << PRSessCount << "beginning" << QDateTime::fromSecsSinceEpoch(ti/1000).toString("MM/dd/yyyy hh:mm:ss"); qDebug() << "SS DET pressure events" << PR->count() << "prSessVount" << PRSessCount << "beginning" << QDateTime::fromSecsSinceEpoch(ti/1000).toString("MM/dd/yyyy hh:mm:ss");
#else
Q_UNUSED(PRSessCount);
#endif #endif
// Update indexes, process waveform and perform flagging // Update indexes, process waveform and perform flagging
sess->setSummaryOnly(false); sess->setSummaryOnly(false);

View File

@ -1145,7 +1145,7 @@ bool Machine::SaveSummaryCache()
bool Machine::Save() bool Machine::Save()
{ {
//int size; //int size;
int cnt = 0; // int cnt = 0;
QString path = getDataPath(); QString path = getDataPath();
QDir dir(path); QDir dir(path);
@ -1160,7 +1160,7 @@ bool Machine::Save()
// store any event summaries.. // store any event summaries..
for (s = sessionlist.begin(); s != sessionlist.end(); s++) { for (s = sessionlist.begin(); s != sessionlist.end(); s++) {
cnt++; // cnt++;
if ((*s)->IsChanged()) { if ((*s)->IsChanged()) {
queTask(new SaveTask(*s, this)); queTask(new SaveTask(*s, this));

View File

@ -316,7 +316,7 @@ bool compressFile(QString infile, QString outfile)
int MachineLoader::Open(const QStringList & paths) int MachineLoader::Open(const QStringList & paths)
{ {
int i, skipped = 0; int i = 0;
int size = paths.size(); int size = paths.size();
for (i=0; i < size; i++) { for (i=0; i < size; i++) {
if (isAborted()) { if (isAborted()) {
@ -328,10 +328,6 @@ int MachineLoader::Open(const QStringList & paths)
if (res < 0) { if (res < 0) {
break; break;
} }
if (res == 0) {
// Should we report on skipped count?
skipped++;
}
emit setProgressValue(i+1); emit setProgressValue(i+1);
QCoreApplication::processEvents(); QCoreApplication::processEvents();
} }

View File

@ -533,13 +533,11 @@ void Report::PrintReport(gGraphView *gv, QString name, QDate date)
progress.setProgressMax(graphs.size()); progress.setProgressMax(graphs.size());
int page = 1; int page = 1;
int gcnt = 0;
for (int i = 0; i < graphs.size(); i++) { for (int i = 0; i < graphs.size(); i++) {
if ((top + full_graph_height + normal_height) > virt_height) { if ((top + full_graph_height + normal_height) > virt_height) {
top = 0; top = 0;
gcnt = 0;
first = true; first = true;
if (page > pages) { if (page > pages) {
@ -616,8 +614,6 @@ void Report::PrintReport(gGraphView *gv, QString name, QDate date)
top += full_graph_height; top += full_graph_height;
gcnt++;
progress.setProgressValue(i); progress.setProgressValue(i);
QApplication::processEvents(); QApplication::processEvents();
} }