Only code clean up to remove many warnings. There should be no changes

to program operation.
This commit is contained in:
Collin Kidder
2022-12-05 19:33:47 -05:00
parent 549113f9e1
commit edc210c336
18 changed files with 62 additions and 59 deletions
-1
View File
@@ -195,7 +195,6 @@ FORMS += ui/candatagrid.ui \
ui/connectionwindow.ui \ ui/connectionwindow.ui \
ui/dbcloadsavewindow.ui \ ui/dbcloadsavewindow.ui \
ui/dbcmaineditor.ui \ ui/dbcmaineditor.ui \
ui/dbcnodeduplicateeditor.ui \
ui/dbcnoderebaseeditor.ui \ ui/dbcnoderebaseeditor.ui \
ui/dbcsignaleditor.ui \ ui/dbcsignaleditor.ui \
ui/dbcnodeeditor.ui \ ui/dbcnodeeditor.ui \
+3
View File
@@ -798,6 +798,7 @@ void GVRetSerial::procRXChar(unsigned char c)
break; break;
case 9: case 9:
buildFrame.bus = c; buildFrame.bus = c;
break;
default: default:
if (rx_step < buildData.length() + 10) if (rx_step < buildData.length() + 10)
{ {
@@ -1010,6 +1011,8 @@ void GVRetSerial::procRXChar(unsigned char c)
emit status(stats); emit status(stats);
break; break;
case GET_FD_SETTINGS:
break;
case GET_EXT_BUSES: case GET_EXT_BUSES:
switch (rx_step) switch (rx_step)
{ {
+3 -3
View File
@@ -228,8 +228,8 @@ void MQTT_BUS::piSetBusSettings(int pBusIdx, CANBus bus)
bool MQTT_BUS::piSendFrame(const CANFrame& frame) bool MQTT_BUS::piSendFrame(const CANFrame& frame)
{ {
QByteArray buffer; QByteArray buffer;
int c; //int c;
quint32 ID; //quint32 ID;
//qDebug() << "Sending out GVRET frame with id " << frame.ID << " on bus " << frame.bus; //qDebug() << "Sending out GVRET frame with id " << frame.ID << " on bus " << frame.bus;
@@ -278,7 +278,7 @@ void MQTT_BUS::readSettings()
void MQTT_BUS::clientMessageReceived(const QMQTT::Message& message) void MQTT_BUS::clientMessageReceived(const QMQTT::Message& message)
{ {
uint64_t timeBasis = CANConManager::getInstance()->getTimeBasis(); //uint64_t timeBasis = CANConManager::getInstance()->getTimeBasis();
/* drop frame if capture is suspended */ /* drop frame if capture is suspended */
+1 -1
View File
@@ -155,7 +155,7 @@ bool DBC_SIGNAL::processAsText(const CANFrame &frame, QString &outString, bool o
//a 32 bit single precision float. That's evil incarnate but it is very fast and small //a 32 bit single precision float. That's evil incarnate but it is very fast and small
//in terms of new code. //in terms of new code.
result = Utility::processIntegerSignal(frame.payload(), startBit, 32, intelByteOrder, false); result = Utility::processIntegerSignal(frame.payload(), startBit, 32, intelByteOrder, false);
endResult = (*((float *)(&result)) * factor) + bias; endResult = (*((float *)(&result)) * factor) + bias; //look away! This is awful. I don't even know for sure if it works. Should test that.
} }
else //double precision float else //double precision float
{ {
+2
View File
@@ -1527,6 +1527,8 @@ bool DBCFile::saveFile(QString fileName)
case ATTR_TYPE_SIG: case ATTR_TYPE_SIG:
msgOutput.append("SG_ "); msgOutput.append("SG_ ");
break; break;
case ATTR_TYPE_ANY:
break;
} }
msgOutput.append("\"" + dbc_attributes[x].name + "\" "); msgOutput.append("\"" + dbc_attributes[x].name + "\" ");
+8 -16
View File
@@ -160,6 +160,7 @@ void DBCMainEditor::writeSettings()
void DBCMainEditor::onCustomMenuTree(QPoint point) void DBCMainEditor::onCustomMenuTree(QPoint point)
{ {
Q_UNUSED(point);
QMenu *menu = new QMenu(this); QMenu *menu = new QMenu(this);
menu->setAttribute(Qt::WA_DeleteOnClose); menu->setAttribute(Qt::WA_DeleteOnClose);
@@ -259,7 +260,7 @@ void DBCMainEditor::onTreeDoubleClicked(const QModelIndex &index)
Q_UNUSED(index) Q_UNUSED(index)
QTreeWidgetItem* firstCol = ui->treeDBC->currentItem(); QTreeWidgetItem* firstCol = ui->treeDBC->currentItem();
bool ret = false; //bool ret = false;
DBC_MESSAGE *msg; DBC_MESSAGE *msg;
DBC_SIGNAL *sig; DBC_SIGNAL *sig;
DBC_NODE *node; DBC_NODE *node;
@@ -311,11 +312,6 @@ void DBCMainEditor::onTreeDoubleClicked(const QModelIndex &index)
void DBCMainEditor::onTreeContextMenu(const QPoint & pos) void DBCMainEditor::onTreeContextMenu(const QPoint & pos)
{ {
QTreeWidgetItem* firstCol = ui->treeDBC->currentItem(); QTreeWidgetItem* firstCol = ui->treeDBC->currentItem();
bool ret = false;
DBC_MESSAGE *msg;
DBC_SIGNAL *sig;
DBC_NODE *node;
uint32_t msgID;
QString idString; QString idString;
qDebug() << firstCol->data(0, Qt::UserRole) << " - " << firstCol->text(0); qDebug() << firstCol->data(0, Qt::UserRole) << " - " << firstCol->text(0);
@@ -324,7 +320,7 @@ void DBCMainEditor::onTreeContextMenu(const QPoint & pos)
{ {
case 1: //a node case 1: //a node
idString = firstCol->text(0).split(" ")[0]; idString = firstCol->text(0).split(" ")[0];
node = dbcFile->findNodeByName(idString); //node = dbcFile->findNodeByName(idString);
QAction *actionRebase = new QAction(QIcon(":/Resource/warning32.ico"), tr("Rebase all messages"), this); QAction *actionRebase = new QAction(QIcon(":/Resource/warning32.ico"), tr("Rebase all messages"), this);
actionRebase->setStatusTip(tr("Rebase all messages in node")); actionRebase->setStatusTip(tr("Rebase all messages in node"));
@@ -338,7 +334,7 @@ void DBCMainEditor::onTreeContextMenu(const QPoint & pos)
menu.addAction(actionRebase); menu.addAction(actionRebase);
menu.addAction(actionDupe); menu.addAction(actionDupe);
QPoint pt(pos); //QPoint pt(pos);
menu.exec( ui->treeDBC->mapToGlobal(pos) ); menu.exec( ui->treeDBC->mapToGlobal(pos) );
break; break;
} }
@@ -347,11 +343,7 @@ void DBCMainEditor::onTreeContextMenu(const QPoint & pos)
void DBCMainEditor::onRebaseMessages() void DBCMainEditor::onRebaseMessages()
{ {
QTreeWidgetItem* firstCol = ui->treeDBC->currentItem(); QTreeWidgetItem* firstCol = ui->treeDBC->currentItem();
bool ret = false;
DBC_MESSAGE *msg;
DBC_SIGNAL *sig;
DBC_NODE *node; DBC_NODE *node;
uint32_t msgID;
QString idString; QString idString;
idString = firstCol->text(0).split(" ")[0]; idString = firstCol->text(0).split(" ")[0];
@@ -368,11 +360,11 @@ void DBCMainEditor::onRebaseMessages()
void DBCMainEditor::onDuplicateNode() void DBCMainEditor::onDuplicateNode()
{ {
QTreeWidgetItem* firstCol = ui->treeDBC->currentItem(); QTreeWidgetItem* firstCol = ui->treeDBC->currentItem();
bool ret = false; //bool ret = false;
DBC_MESSAGE *msg; //DBC_MESSAGE *msg;
DBC_SIGNAL *sig; //DBC_SIGNAL *sig;
//uint32_t msgID;
DBC_NODE *node; DBC_NODE *node;
uint32_t msgID;
QString idString; QString idString;
idString = firstCol->text(0).split(" ")[0]; idString = firstCol->text(0).split(" ")[0];
+6 -6
View File
@@ -41,7 +41,7 @@ DBCNodeDuplicateEditor::DBCNodeDuplicateEditor(QWidget *parent) :
return; return;
} }
uint rebaseDiff = newBase - lowestMsgId; int32_t rebaseDiff = newBase - lowestMsgId;
QList<DBC_MESSAGE*> messagesForNode = dbcFile->messageHandler->findMsgsByNode(dbcNode); QList<DBC_MESSAGE*> messagesForNode = dbcFile->messageHandler->findMsgsByNode(dbcNode);
if(messagesForNode.count() == 0) if(messagesForNode.count() == 0)
@@ -70,11 +70,11 @@ DBCNodeDuplicateEditor::DBCNodeDuplicateEditor(QWidget *parent) :
return; return;
} }
for (int i=0; i<messagesForNode.count(); i++) for (int i = 0; i < messagesForNode.count(); i++)
{ {
uint newMsgId = messagesForNode[i]->ID + rebaseDiff; int32_t newMsgId = messagesForNode[i]->ID + rebaseDiff;
if(newMsgId < 0 || newMsgId > 0x1FFFFFFFul) if(newMsgId < 0 || newMsgId > 0x1FFFFFFFl)
{ {
QMessageBox::question(this, "Invalid Address Range", "The new starting address would cause a message to be outside of the valid address range.", QMessageBox::question(this, "Invalid Address Range", "The new starting address would cause a message to be outside of the valid address range.",
QMessageBox::Ok); QMessageBox::Ok);
@@ -82,9 +82,9 @@ DBCNodeDuplicateEditor::DBCNodeDuplicateEditor(QWidget *parent) :
} }
} }
for (int i=0; i<messagesForNode.count(); i++) for (int i = 0; i < messagesForNode.count(); i++)
{ {
uint newMsgId = messagesForNode[i]->ID + rebaseDiff; int32_t newMsgId = messagesForNode[i]->ID + rebaseDiff;
emit cloneMessageToNode(nodePtr, messagesForNode[i], newMsgId); emit cloneMessageToNode(nodePtr, messagesForNode[i], newMsgId);
} }
+4 -4
View File
@@ -62,11 +62,11 @@ DBCNodeRebaseEditor::DBCNodeRebaseEditor(QWidget *parent) :
return; return;
} }
for (int i=0; i<messagesForNode.count(); i++) for (int i = 0; i < messagesForNode.count(); i++)
{ {
uint newMsgId = messagesForNode[i]->ID + rebaseDiff; int32_t newMsgId = messagesForNode[i]->ID + rebaseDiff;
if(newMsgId < 0 || newMsgId > 0x1FFFFFFFul) if(newMsgId < 0 || newMsgId > 0x1FFFFFFFl)
{ {
QMessageBox::question(this, "Invalid Address Range", "The new starting address would cause a message to be outside of the valid address range.", QMessageBox::question(this, "Invalid Address Range", "The new starting address would cause a message to be outside of the valid address range.",
QMessageBox::Ok); QMessageBox::Ok);
@@ -74,7 +74,7 @@ DBCNodeRebaseEditor::DBCNodeRebaseEditor(QWidget *parent) :
} }
} }
for (int i=0; i<messagesForNode.count(); i++) for (int i = 0; i < messagesForNode.count(); i++)
{ {
messagesForNode[i]->ID += rebaseDiff; messagesForNode[i]->ID += rebaseDiff;
emit updatedTreeInfo(messagesForNode[i]); emit updatedTreeInfo(messagesForNode[i]);
+18 -12
View File
@@ -1551,9 +1551,9 @@ bool FrameFileIO::isCanalyzerASC(QString filename)
{ {
QFile *inFile = new QFile(filename); QFile *inFile = new QFile(filename);
QByteArray line; QByteArray line;
int lineCounter = 0; //int lineCounter = 0;
//bool inHeader = true;
bool isMatch = true; bool isMatch = true;
bool inHeader = true;
QList<QByteArray> tokens; QList<QByteArray> tokens;
if (!inFile->open(QIODevice::ReadOnly | QIODevice::Text)) if (!inFile->open(QIODevice::ReadOnly | QIODevice::Text))
@@ -4188,8 +4188,8 @@ bool FrameFileIO::loadTeslaAPFile(QString filename, QVector<CANFrame>* frames)
CANFrame thisFrame; CANFrame thisFrame;
int lineCounter = 0; int lineCounter = 0;
QByteArray data; QByteArray data;
int timeOffset = 0; //int timeOffset = 0;
int64_t lastTimeStamp = 0; //int64_t lastTimeStamp = 0;
bool foundErrors = false; bool foundErrors = false;
thisFrame.setFrameType(QCanBusFrame::DataFrame); thisFrame.setFrameType(QCanBusFrame::DataFrame);
TeslaAPCANRecord record; TeslaAPCANRecord record;
@@ -4246,7 +4246,7 @@ bool FrameFileIO::isCLX000File(QString filename) {
} }
QTextStream fileStream(inFile.get()); QTextStream fileStream(inFile.get());
bool foundErrors = false; //bool foundErrors = false;
// Contains 16 lines of header prior to (potential) data. // Contains 16 lines of header prior to (potential) data.
QString headerLine; QString headerLine;
@@ -4298,7 +4298,7 @@ bool FrameFileIO::isCLX000File(QString filename) {
qDebug() << "Could not decode time format" << headerLine << "using pattern" << timeFormatPattern; qDebug() << "Could not decode time format" << headerLine << "using pattern" << timeFormatPattern;
return false; return false;
} }
auto timeFormat = matchTimeFormat.captured("timeFormat").front().digitValue(); //auto timeFormat = matchTimeFormat.captured("timeFormat").front().digitValue();
headerLine = fileStream.readLine(); headerLine = fileStream.readLine();
QString const timeSeparatorPattern = "# Time separator: \"(?<timeSeparator>[" + validSeparators + "]?)\""; QString const timeSeparatorPattern = "# Time separator: \"(?<timeSeparator>[" + validSeparators + "]?)\"";
@@ -4308,7 +4308,7 @@ bool FrameFileIO::isCLX000File(QString filename) {
qDebug() << "Could not decode time format" << headerLine << "using pattern" << timeSeparatorPattern; qDebug() << "Could not decode time format" << headerLine << "using pattern" << timeSeparatorPattern;
return false; return false;
} }
QChar timeSeparator = matchTimeSeparator.captured("timeSeparator").front(); //QChar timeSeparator = matchTimeSeparator.captured("timeSeparator").front();
headerLine = fileStream.readLine(); headerLine = fileStream.readLine();
QString const timeSeparatorMsPattern = "# Time separator ms: \"(?<timeSeparatorMs>[" + validSeparators + "]?)\""; QString const timeSeparatorMsPattern = "# Time separator ms: \"(?<timeSeparatorMs>[" + validSeparators + "]?)\"";
@@ -4318,7 +4318,7 @@ bool FrameFileIO::isCLX000File(QString filename) {
qDebug() << "Could not decode time format ms" << headerLine << "using pattern" << timeSeparatorMsPattern; qDebug() << "Could not decode time format ms" << headerLine << "using pattern" << timeSeparatorMsPattern;
return false; return false;
} }
QChar timeSeparatorMs = matchTimeSeparatorMs.captured("timeSeparatorMs").front(); //QChar timeSeparatorMs = matchTimeSeparatorMs.captured("timeSeparatorMs").front();
headerLine = fileStream.readLine(); headerLine = fileStream.readLine();
QString const dateSeparatorPattern = "# Date separator: \"(?<dateSeparator>[" + validSeparators + "]?)\""; QString const dateSeparatorPattern = "# Date separator: \"(?<dateSeparator>[" + validSeparators + "]?)\"";
@@ -4328,7 +4328,7 @@ bool FrameFileIO::isCLX000File(QString filename) {
qDebug() << "Could not decode time format ms" << headerLine << "using pattern" << dateSeparatorPattern; qDebug() << "Could not decode time format ms" << headerLine << "using pattern" << dateSeparatorPattern;
return false; return false;
} }
QChar dateSeparator = matchDateSeparator.captured("dateSeparator").front(); //QChar dateSeparator = matchDateSeparator.captured("dateSeparator").front();
headerLine = fileStream.readLine(); headerLine = fileStream.readLine();
QString const timeDateSeparatorPattern = "# Time and date separator: \"(?<timeDateSeparator>[" + validSeparators + "]?)\""; QString const timeDateSeparatorPattern = "# Time and date separator: \"(?<timeDateSeparator>[" + validSeparators + "]?)\"";
@@ -4338,7 +4338,7 @@ bool FrameFileIO::isCLX000File(QString filename) {
qDebug() << "Could not decode time format ms" << headerLine << "using pattern" << timeDateSeparatorPattern; qDebug() << "Could not decode time format ms" << headerLine << "using pattern" << timeDateSeparatorPattern;
return false; return false;
} }
QChar timeDateSeparator = matchTimeDateSeparator.captured("timeDateSeparator").front(); //QChar timeDateSeparator = matchTimeDateSeparator.captured("timeDateSeparator").front();
// Skip remaining header lines. // Skip remaining header lines.
fileStream.readLine(); fileStream.readLine();
@@ -4509,6 +4509,7 @@ bool FrameFileIO::loadCLX000File(QString filename, QVector<CANFrame>* frames) {
} }
// Fallthrough // Fallthrough
[[fallthrough]];
} }
case 5: { case 5: {
// Handle month. // Handle month.
@@ -4519,6 +4520,7 @@ bool FrameFileIO::loadCLX000File(QString filename, QVector<CANFrame>* frames) {
} }
// Fallthrough // Fallthrough
[[fallthrough]];
} }
case 4: { case 4: {
// Handle day. // Handle day.
@@ -4529,6 +4531,7 @@ bool FrameFileIO::loadCLX000File(QString filename, QVector<CANFrame>* frames) {
} }
// Fallthrough // Fallthrough
[[fallthrough]];
} }
case 3: { case 3: {
// Handle hours. // Handle hours.
@@ -4539,6 +4542,7 @@ bool FrameFileIO::loadCLX000File(QString filename, QVector<CANFrame>* frames) {
} }
// Fallthrough // Fallthrough
[[fallthrough]];
} }
case 2: { case 2: {
// Handle minutes. // Handle minutes.
@@ -4549,6 +4553,7 @@ bool FrameFileIO::loadCLX000File(QString filename, QVector<CANFrame>* frames) {
} }
// Fallthrough // Fallthrough
[[fallthrough]];
} }
case 1: { case 1: {
// Handle seconds. // Handle seconds.
@@ -4559,6 +4564,7 @@ bool FrameFileIO::loadCLX000File(QString filename, QVector<CANFrame>* frames) {
} }
// Fallthrough // Fallthrough
[[fallthrough]];
} }
case 0: { case 0: {
// Handle milliseconds. // Handle milliseconds.
@@ -4736,7 +4742,7 @@ bool FrameFileIO::loadCANServerFile(QString filename, QVector<CANFrame>* frames)
if (fileIsGood) if (fileIsGood)
{ {
uint64_t lastFrameTime = 0; //uint64_t lastFrameTime = 0;
uint8_t data[1]; uint8_t data[1];
while (!inFile->atEnd()) while (!inFile->atEnd())
@@ -4843,7 +4849,7 @@ bool FrameFileIO::loadCANServerFile(QString filename, QVector<CANFrame>* frames)
frameoffset *= 1000; frameoffset *= 1000;
frameTime += frameoffset; frameTime += frameoffset;
lastFrameTime = frameTime; //lastFrameTime = frameTime;
thisFrame.setTimeStamp(QCanBusFrame::TimeStamp(0, frameTime)); thisFrame.setTimeStamp(QCanBusFrame::TimeStamp(0, frameTime));
+2 -2
View File
@@ -481,12 +481,12 @@ void JSHighlighter::mark(const QString &str, Qt::CaseSensitivity caseSensitivity
QStringList JSHighlighter::keywords() const QStringList JSHighlighter::keywords() const
{ {
return m_keywords.toList(); return m_keywords.values();
} }
void JSHighlighter::setKeywords(const QStringList &keywords) void JSHighlighter::setKeywords(const QStringList &keywords)
{ {
m_keywords = QSet<QString>::fromList(keywords); m_keywords = QSet<QString>(keywords.begin(), keywords.end());
rehighlight(); rehighlight();
} }
+7 -6
View File
@@ -677,7 +677,7 @@ void MainWindow::updateFilterList()
for (filterIter = busFilters->begin(); filterIter != busFilters->end(); ++filterIter) for (filterIter = busFilters->begin(); filterIter != busFilters->end(); ++filterIter)
{ {
QListWidgetItem *thisItem = FilterUtility::createCheckableBusFilterItem(filterIter.key(), filterIter.value(), ui->listBusFilters); /*QListWidgetItem *thisItem = */ FilterUtility::createCheckableBusFilterItem(filterIter.key(), filterIter.value(), ui->listBusFilters);
} }
inhibitFilterUpdate = false; inhibitFilterUpdate = false;
} }
@@ -738,6 +738,7 @@ void MainWindow::filterClearAll()
void MainWindow::logReceivedFrame(CANConnection* conn, QVector<CANFrame> frames) void MainWindow::logReceivedFrame(CANConnection* conn, QVector<CANFrame> frames)
{ {
Q_UNUSED(conn);
if (continuousLogging) if (continuousLogging)
{ {
FrameFileIO::writeContinuousNative(&frames, 0); FrameFileIO::writeContinuousNative(&frames, 0);
@@ -1053,7 +1054,7 @@ void MainWindow::saveDecodedTextFileAsColumns(QString filename)
QFile *outFile = new QFile(filename); QFile *outFile = new QFile(filename);
const QVector<CANFrame> *frames = model->getFilteredListReference(); const QVector<CANFrame> *frames = model->getFilteredListReference();
const unsigned char *data; //const unsigned char *data;
int dataLen; int dataLen;
const CANFrame *frame; const CANFrame *frame;
@@ -1064,7 +1065,7 @@ Time: 205.173000 ID: 0x20E Std Bus: 0 Len: 8
Data Bytes: 88 10 00 13 BB 00 06 00 Data Bytes: 88 10 00 13 BB 00 06 00
SignalName Value SignalName Value
*/ */
QList<QPair<int, int>> msgsAndColumns; QList<QPair<uint32_t, int>> msgsAndColumns;
int columnsAdded = 0; int columnsAdded = 0;
int dataStartCol = 0; int dataStartCol = 0;
@@ -1090,7 +1091,7 @@ Data Bytes: 88 10 00 13 BB 00 06 00
for (int c = 0; c < frames->count(); c++) for (int c = 0; c < frames->count(); c++)
{ {
frame = &frames->at(c); frame = &frames->at(c);
data = reinterpret_cast<const unsigned char *>(frame->payload().constData()); //data = reinterpret_cast<const unsigned char *>(frame->payload().constData());
dataLen = frame->payload().count(); dataLen = frame->payload().count();
//add all column names //add all column names
@@ -1110,7 +1111,7 @@ Data Bytes: 88 10 00 13 BB 00 06 00
found = true; found = true;
} }
if(found == false) if(found == false)
msgsAndColumns.append(QPair<int,int>(msg->ID, columnsAdded)); msgsAndColumns.append(QPair<uint32_t,int>(msg->ID, columnsAdded));
} }
if(found == false) if(found == false)
@@ -1147,7 +1148,7 @@ Data Bytes: 88 10 00 13 BB 00 06 00
{ {
dataColumnsAdded = 0; dataColumnsAdded = 0;
frame = &frames->at(c); frame = &frames->at(c);
data = reinterpret_cast<const unsigned char *>(frame->payload().constData()); //data = reinterpret_cast<const unsigned char *>(frame->payload().constData());
dataLen = frame->payload().count(); dataLen = frame->payload().count();
QString builderString; QString builderString;
+3
View File
@@ -3,6 +3,9 @@
QString QCPAxisTickerHex::getTickLabel (double tick, const QLocale &locale, QChar formatChar, int precision) QString QCPAxisTickerHex::getTickLabel (double tick, const QLocale &locale, QChar formatChar, int precision)
{ {
Q_UNUSED(locale);
Q_UNUSED(formatChar);
Q_UNUSED(precision);
int64_t hexVal = static_cast<int64_t>(tick); int64_t hexVal = static_cast<int64_t>(tick);
return QString::number(hexVal, 16); return QString::number(hexVal, 16);
} }
+1 -1
View File
@@ -311,7 +311,7 @@ void FlowViewWindow::gotCenterTimeID(uint32_t ID, double timestamp)
for (int j = 0; j < ui->listFrameID->count(); j++) for (int j = 0; j < ui->listFrameID->count(); j++)
{ {
int thisNum = FilterUtility::getIdAsInt(ui->listFrameID->item(j)); uint32_t thisNum = FilterUtility::getIdAsInt(ui->listFrameID->item(j));
if (thisNum == ID) if (thisNum == ID)
{ {
ui->listFrameID->setCurrentRow(j); ui->listFrameID->setCurrentRow(j);
-1
View File
@@ -1434,7 +1434,6 @@ void GraphingWindow::createGraph(GraphParams &params, bool createGraphParam)
if (params.prevValLocation != QPointF(0,0)) if (params.prevValLocation != QPointF(0,0))
{ {
int j = numEntries - 1;
QCPItemBracket *bracket = new QCPItemBracket(ui->graphingView); QCPItemBracket *bracket = new QCPItemBracket(ui->graphingView);
bracket->left->setCoords(params.prevValLocation); bracket->left->setCoords(params.prevValLocation);
bracket->right->setCoords(x, params.prevValLocation.y()); bracket->right->setCoords(x, params.prevValLocation.y());
+1 -1
View File
@@ -253,7 +253,7 @@ void SnifferModel::refresh()
for (i = mMap.begin(); i != mMap.end(); ++i) for (i = mMap.begin(); i != mMap.end(); ++i)
{ {
//i.value()->updateMarker(); //i.value()->updateMarker();
if(i.value()->elapsed() > mExpireInterval && !mNeverExpire) if(i.value()->elapsed() > (int)mExpireInterval && !mNeverExpire)
toRemove.append(i.key()); toRemove.append(i.key());
} }
-2
View File
@@ -178,7 +178,6 @@ void UDSScanWindow::loadScans()
QString filename; QString filename;
QFileDialog dialog(qApp->activeWindow()); QFileDialog dialog(qApp->activeWindow());
QSettings settings; QSettings settings;
bool result = false;
QStringList filters; QStringList filters;
filters.append(QString(tr("UDS Test Specification (*.uds *.UDS)"))); filters.append(QString(tr("UDS Test Specification (*.uds *.UDS)")));
@@ -231,7 +230,6 @@ void UDSScanWindow::saveScans()
QString filename; QString filename;
QFileDialog dialog(qApp->activeWindow()); QFileDialog dialog(qApp->activeWindow());
QSettings settings; QSettings settings;
bool result = false;
QStringList filters; QStringList filters;
filters.append(QString(tr("UDS Test Specification (*.uds *.UDS)"))); filters.append(QString(tr("UDS Test Specification (*.uds *.UDS)")));
+2 -2
View File
@@ -351,13 +351,13 @@ void SignalViewerWindow::loadDefinitions(bool append)
QString msgName = QString(tokens[2]); QString msgName = QString(tokens[2]);
QString sigName = QString(tokens[3]); QString sigName = QString(tokens[3]);
DBC_MESSAGE *msg;; DBC_MESSAGE *msg;;
if(msg = dbcHandler->findMessage(msgId)) if( (msg = dbcHandler->findMessage(msgId)) )
{ {
sig = msg->sigHandler->findSignalByName(sigName); sig = msg->sigHandler->findSignalByName(sigName);
if(sig) if(sig)
loadedSignals.append(sig); loadedSignals.append(sig);
} }
else if (msg = dbcHandler->findMessage(msgName)) else if ( (msg = dbcHandler->findMessage(msgName)) )
{ {
//this is not a very safe way to match since messages names can be duplicated //this is not a very safe way to match since messages names can be duplicated
sig = msg->sigHandler->findSignalByName(sigName); sig = msg->sigHandler->findSignalByName(sigName);
+1 -1
View File
@@ -287,7 +287,7 @@ public:
if (isSigned) if (isSigned)
{ {
int64_t mask = (1ULL << (sigSize - 1)); uint64_t mask = (1ULL << (sigSize - 1));
if ((result & mask) == mask) //is the highest bit possible for this signal size set? if ((result & mask) == mask) //is the highest bit possible for this signal size set?
{ {
/* /*