Skip to content

Commit

Permalink
Remove unused vars from qdltimporter
Browse files Browse the repository at this point in the history
Signed-off-by: Viktor Kopp <[email protected]>
  • Loading branch information
vifactor committed Jan 5, 2025
1 parent 0f7221b commit 8fd9e42
Showing 1 changed file with 4 additions and 12 deletions.
16 changes: 4 additions & 12 deletions qdlt/qdltimporter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,6 @@ void QDltImporter::dltIpcFromMF4(QString fileName)
mdf_hdr_t mdfHeader,mdfDgHeader,mdfCgHeader,mdfCnHeader,mdfTxHeader;
mdf_dgblocklinks_t mdfDgBlockLinks;
memset((char*)&mdfHeader,0,sizeof(mdf_hdr_t));
quint64 pos=0,hd_pos=0,dt_pos=0;

if(inputfile.read((char*)&mdfHeader,sizeof(mdf_hdr_t))!=sizeof(mdf_hdr_t))
{
Expand All @@ -197,11 +196,8 @@ void QDltImporter::dltIpcFromMF4(QString fileName)
qDebug() << "fromMF4:" << "Size Error: Cannot read mdf header";
return;
}
if(!hd_pos && mdfHeader.id[0]=='#' && mdfHeader.id[1]=='#' && mdfHeader.id[2]=='H' && mdfHeader.id[3]=='D')
if(mdfHeader.id[0]=='#' && mdfHeader.id[1]=='#' && mdfHeader.id[2]=='H' && mdfHeader.id[3]=='D')
{
pos = inputfile.pos() - sizeof(mdf_hdr_t);
//qDebug() << "HD:";
hd_pos=pos;
if(inputfile.read((char*)&hdBlockLinks,sizeof(mdf_hdblocklinks_t))!=sizeof(mdf_hdblocklinks_t))
{
inputfile.close();
Expand Down Expand Up @@ -381,9 +377,7 @@ void QDltImporter::dltIpcFromMF4(QString fileName)
}
if(mdfHeader.id[0]=='#' && mdfHeader.id[1]=='#' && mdfHeader.id[2]=='D' && mdfHeader.id[3]=='T')
{
pos = inputfile.pos() - sizeof(mdf_hdr_t);
//qDebug() << "DT:";
dt_pos=pos;
const auto pos = inputfile.pos() - sizeof(mdf_hdr_t);
quint64 posDt=0;
quint16 recordId;
quint32 lengthVLSD;
Expand Down Expand Up @@ -506,17 +500,15 @@ void QDltImporter::dltIpcFromMF4(QString fileName)
}
if(!recordData.isEmpty())
{
int pos = 0;
quint64 time = hdBlockLinks.start_time_ns+ethFrame.timeStamp+(hdBlockLinks.hd_tz_offset_min+hdBlockLinks.hd_dst_offset_min)*60*1000000000;
if(!dltFromEthernetFrame(recordData,pos,ethFrame.etherType,time/1000000000,time%1000000000/1000))
if(!dltFromEthernetFrame(recordData,0,ethFrame.etherType,time/1000000000,time%1000000000/1000))
{
inputfile.close();
outputfile->close();
qDebug() << "fromMF4: ERROR:" << "Size Error: Cannot read Ethernet Frame";
return;
}
pos = 0;
if(!ipcFromEthernetFrame(recordData,pos,ethFrame.etherType,time/1000000000,time%1000000000/1000))
if(!ipcFromEthernetFrame(recordData,0,ethFrame.etherType,time/1000000000,time%1000000000/1000))
{
inputfile.close();
outputfile->close();
Expand Down

0 comments on commit 8fd9e42

Please sign in to comment.