Skip to content

Commit

Permalink
Fix clang value is never read, uninitialized field warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Aug 15, 2021
1 parent 9d4c888 commit fff1ddb
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
5 changes: 2 additions & 3 deletions src/drw_header.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2400,9 +2400,8 @@ bool DRW_Header::parseDwg(DRW::Version version, dwgBuffer *buf, dwgBuffer *hBbuf
}

//temporary code to show header end sentinel
duint64 sz= buf->size()-1;
if (version < DRW::AC1018) {//pre 2004
sz= buf->size()-16;
const duint64 sz= buf->size()-16;
buf->setPosition(sz);
DRW_DBG("\nseting position to: "); DRW_DBG(buf->getPosition());
DRW_DBG("\ndwg header end sentinel= ");
Expand All @@ -2419,7 +2418,7 @@ bool DRW_Header::parseDwg(DRW::Version version, dwgBuffer *buf, dwgBuffer *hBbuf
DRW_DBGH(buf->getRawChar8()); DRW_DBG(" ");
}
} else if (version == DRW::AC1021) {//2007
sz= buf->size()-16;
const duint64 sz= buf->size()-16;
buf->setPosition(sz);
DRW_DBG("\nseting position to: "); DRW_DBG(buf->getPosition());
DRW_DBG("\ndwg header end sentinel= ");
Expand Down
1 change: 1 addition & 0 deletions src/intern/dwgreader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -710,6 +710,7 @@ bool dwgReader::readDwgTables(DRW_Header& hdr, dwgBuffer *dbuf) {
ret = false;
} else { //reset position
buff.resetPosition();
(void)bs;
/* RLZ: writeme ret2 = vpEntHeader.parseDwg(version, &buff, bs);
if(ret)
ret = ret2;*/
Expand Down
14 changes: 7 additions & 7 deletions src/intern/dwgreader.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,13 +60,13 @@ class dwgPageInfo {
dwgPageInfo(duint64 i, duint64 ad, duint32 sz){
Id=i; address=ad; size=sz;
}
duint64 Id;
duint64 address; //in file stream, for rd18, rd21
duint64 size; //in file stream, for rd18, rd21
duint64 dataSize; //for rd18, rd21
duint32 startOffset; //for rd18, rd21
duint64 cSize; //compresed page size, for rd21
duint64 uSize; //uncompresed page size, for rd21
duint64 Id{0};
duint64 address{0}; //in file stream, for rd18, rd21
duint64 size{0}; //in file stream, for rd18, rd21
duint64 dataSize{0}; //for rd18, rd21
duint32 startOffset{0}; //for rd18, rd21
duint64 cSize{0}; //compressed page size, for rd21
duint64 uSize{0}; //uncompressed page size, for rd21
};

// sections of file
Expand Down

0 comments on commit fff1ddb

Please sign in to comment.