Skip to content

Commit fff1ddb

Browse files
committed
Fix clang value is never read, uninitialized field warnings
1 parent 9d4c888 commit fff1ddb

File tree

3 files changed

+10
-10
lines changed

3 files changed

+10
-10
lines changed

src/drw_header.cpp

+2-3
Original file line numberDiff line numberDiff line change
@@ -2400,9 +2400,8 @@ bool DRW_Header::parseDwg(DRW::Version version, dwgBuffer *buf, dwgBuffer *hBbuf
24002400
}
24012401

24022402
//temporary code to show header end sentinel
2403-
duint64 sz= buf->size()-1;
24042403
if (version < DRW::AC1018) {//pre 2004
2405-
sz= buf->size()-16;
2404+
const duint64 sz= buf->size()-16;
24062405
buf->setPosition(sz);
24072406
DRW_DBG("\nseting position to: "); DRW_DBG(buf->getPosition());
24082407
DRW_DBG("\ndwg header end sentinel= ");
@@ -2419,7 +2418,7 @@ bool DRW_Header::parseDwg(DRW::Version version, dwgBuffer *buf, dwgBuffer *hBbuf
24192418
DRW_DBGH(buf->getRawChar8()); DRW_DBG(" ");
24202419
}
24212420
} else if (version == DRW::AC1021) {//2007
2422-
sz= buf->size()-16;
2421+
const duint64 sz= buf->size()-16;
24232422
buf->setPosition(sz);
24242423
DRW_DBG("\nseting position to: "); DRW_DBG(buf->getPosition());
24252424
DRW_DBG("\ndwg header end sentinel= ");

src/intern/dwgreader.cpp

+1
Original file line numberDiff line numberDiff line change
@@ -710,6 +710,7 @@ bool dwgReader::readDwgTables(DRW_Header& hdr, dwgBuffer *dbuf) {
710710
ret = false;
711711
} else { //reset position
712712
buff.resetPosition();
713+
(void)bs;
713714
/* RLZ: writeme ret2 = vpEntHeader.parseDwg(version, &buff, bs);
714715
if(ret)
715716
ret = ret2;*/

src/intern/dwgreader.h

+7-7
Original file line numberDiff line numberDiff line change
@@ -60,13 +60,13 @@ class dwgPageInfo {
6060
dwgPageInfo(duint64 i, duint64 ad, duint32 sz){
6161
Id=i; address=ad; size=sz;
6262
}
63-
duint64 Id;
64-
duint64 address; //in file stream, for rd18, rd21
65-
duint64 size; //in file stream, for rd18, rd21
66-
duint64 dataSize; //for rd18, rd21
67-
duint32 startOffset; //for rd18, rd21
68-
duint64 cSize; //compresed page size, for rd21
69-
duint64 uSize; //uncompresed page size, for rd21
63+
duint64 Id{0};
64+
duint64 address{0}; //in file stream, for rd18, rd21
65+
duint64 size{0}; //in file stream, for rd18, rd21
66+
duint64 dataSize{0}; //for rd18, rd21
67+
duint32 startOffset{0}; //for rd18, rd21
68+
duint64 cSize{0}; //compressed page size, for rd21
69+
duint64 uSize{0}; //uncompressed page size, for rd21
7070
};
7171

7272
// sections of file

0 commit comments

Comments
 (0)