fail to compile on Ubuntu 22.0 with Clang 14.0.0 - variables set but not used && implicit copy assignment operator

This commit is contained in:
LoudSnorer 2023-02-17 11:22:27 -05:00
parent 7192d28d8b
commit 93c58ccb52
8 changed files with 22 additions and 21 deletions

View File

@ -23,6 +23,7 @@ public:
PressureInfo();
PressureInfo(ChannelID code, qint64 minTime, qint64 maxTime) ;
PressureInfo(PressureInfo &copy) = default;
~PressureInfo() {} ;
void AddChannel(ChannelID c);
void AddChannels(QList<ChannelID> & chans);
@ -272,3 +273,4 @@ public:
};
#endif // MINUTESATPRESSURE_H

View File

@ -508,9 +508,9 @@ void gLineChart::paint(QPainter &painter, gGraph &w, const QRegion &region)
height -= 2;
int num_points = 0;
int visible_points = 0;
//int visible_points = 0;
int total_points = 0;
int total_visible = 0;
//int total_visible = 0;
bool square_plot, accel;
qint64 clockdrift = qint64(p_profile->cpap->clockDrift()) * 1000L;
qint64 drift = 0;
@ -671,7 +671,7 @@ void gLineChart::paint(QPainter &painter, gGraph &w, const QRegion &region)
double ZR = ZD / sr;
double ZQ = ZR / XR;
double ZW = ZR / (width * ZQ);
visible_points += ZR * ZQ;
//visible_points += ZR * ZQ;
// if (accel && n > 0) {
// sam = 1;
@ -700,7 +700,7 @@ void gLineChart::paint(QPainter &painter, gGraph &w, const QRegion &region)
maxz = 0;
}
total_visible += visible_points;
//total_visible += visible_points;
} else {
sam = 1;
}
@ -1083,7 +1083,7 @@ void gLineChart::paint(QPainter &painter, gGraph &w, const QRegion &region)
extras.push_back(CPAP_UserFlag1);
extras.push_back(CPAP_UserFlag2);
double sum = 0;
//double sum = 0;
int cnt = 0;
//Draw the linechart overlays (Event flags) independant of line Cursor mode
@ -1102,7 +1102,7 @@ void gLineChart::paint(QPainter &painter, gGraph &w, const QRegion &region)
if (lob->hover()) blockhover = true; // did it render a hover over?
if (ahilist.contains(code)) {
sum += lob->sum();
//sum += lob->sum();
cnt += lob->count();
}
}

View File

@ -322,16 +322,16 @@ void FlowParser::calcPeaks(EventDataType *input, int samples)
EventDataType zeroline = 0;
double rate = m_flow->rate();
// double rate = m_flow->rate();
double flowstart = m_flow->first();
double time; //, lasttime;
// double flowstart = m_flow->first();
//double time; //, lasttime;
//double peakmax = flowstart,
//double peakmin = flowstart;
// lasttime =
time = flowstart;
// time = flowstart;
breaths.clear();
// Estimate storage space needed using typical average breaths per minute.
@ -407,7 +407,7 @@ void FlowParser::calcPeaks(EventDataType *input, int samples)
}
//lasttime = time;
time += rate;
// time += rate;
lastc = c;
//lastk = k;
}
@ -1476,7 +1476,7 @@ int calcSPO2Drop(Session *session)
auto it = session->eventlist.find(OXI_SPO2);
if (it == session->eventlist.end()) { return 0; }
EventDataType val, val2, change, tmp;
EventDataType val, val2, change ; // , tmp;
qint64 time, time2;
qint64 window = p_profile->oxi->spO2DropDuration();
window *= 1000;
@ -1494,7 +1494,7 @@ int calcSPO2Drop(Session *session)
//int rp=0;
int min;
int cnt = 0;
tmp = 0;
// tmp = 0;
qint64 start = 0;
@ -1514,7 +1514,7 @@ int calcSPO2Drop(Session *session)
if (time > start + 3600000) { break; } // just look at the first hour
tmp += val;
// tmp += val;
cnt++;
}
}

View File

@ -932,6 +932,7 @@ bool FPIconLoader::OpenDetail(Machine *mach, const QString & filename)
quint8 recs;
int totalrecs = 0;
Q_UNUSED( totalrecs );
do {
in >> ts;

View File

@ -870,6 +870,7 @@ bool SleepStyleLoader::OpenDetail(Machine *mach, const QString & filename)
quint16 unknownIndex;
int totalrecs = 0;
Q_UNUSED( totalrecs );
do {
// Read timestamp for session and check for end of data signal

View File

@ -372,6 +372,7 @@ int WeinmannLoader::Open(const QString & dirpath)
EventList * FL = sess->AddEventList(CPAP_FlowLimit, EVL_Event);
// EventList * VS = sess->AddEventList(CPAP_VSnore, EVL_Event);
quint64 tt = ti;
Q_UNUSED (tt);
quint64 step = sess->length() / ci.event_recs;
unsigned char *p = &ev[ci.event_start];
for (quint32 j=0; j < ci.event_recs; ++j) {

View File

@ -750,7 +750,6 @@ void Daily::UpdateEventsTree(QTreeWidget *tree,Day *day)
QTreeWidgetItem *root=nullptr;
QHash<ChannelID,QTreeWidgetItem *> mcroot;
QHash<ChannelID,int> mccnt;
int total_events=0;
qint64 drift=0, clockdrift=p_profile->cpap->clockDrift()*1000L;
@ -777,7 +776,6 @@ void Daily::UpdateEventsTree(QTreeWidget *tree,Day *day)
if (mcroot.find(code)==mcroot.end()) {
int cnt=day->count(code);
if (!cnt) continue; // If no events than don't bother showing..
total_events+=cnt;
QString st=schema::channel[code].fullname();
if (st.isEmpty()) {
st=QString("Fixme %1").arg(code);
@ -845,9 +843,7 @@ void Daily::UpdateEventsTree(QTreeWidget *tree,Day *day)
end->addChild(item);
}
}
//tree->insertTopLevelItem(cnt++,new QTreeWidgetItem(QStringList("[Total Events ("+QString::number(total_events)+")]")));
tree->sortByColumn(0,Qt::AscendingOrder);
//tree->expandAll();
}
void Daily::UpdateCalendarDay(QDate date)

View File

@ -8,7 +8,7 @@
* for more details. */
#define TEST_MACROS_ENABLEDoff
#define TEST_MACROS_ENABLED
#include <test_macros.h>
#include <QWidget>
@ -608,7 +608,7 @@ bool DailySearchTab::find(QDate& date,Day* day)
case OT_SESSION_LENGTH :
{
bool valid=false;
qint64 value;
qint64 value=0;
QList<Session *> sessions = day->getSessions(MT_CPAP);
for (auto & sess : sessions) {
//qint64 msF = sess->realFirst();
@ -628,7 +628,7 @@ bool DailySearchTab::find(QDate& date,Day* day)
}
}
// use best / lowest daily value that meets criteria
updateValues(value);
if (valid) updateValues(value);
}
break;
case OT_SESSIONS_QTY :