Opposite inner 'if' condition leads to a dead code block.
Cppcheck warns that this code leads to a dead end.
https://github.com/LibreCAD/libdxfrw/blob/a610710c31f6029f70e169bd657d3a32e8e0bf38/src/drw_header.cpp#L604
Looks like because of this line
https://github.com/LibreCAD/libdxfrw/blob/a610710c31f6029f70e169bd657d3a32e8e0bf38/src/drw_header.cpp#L541
Indeed, and there are some more https://github.com/LibreCAD/libdxfrw/blob/a610710c31f6029f70e169bd657d3a32e8e0bf38/src/drw_header.cpp#L1108-L1111 recognized by investigating LibreCAD/LibreCAD#636: https://github.com/LibreCAD/libdxfrw/blob/a610710c31f6029f70e169bd657d3a32e8e0bf38/src/drw_header.cpp#L1354-L1362 and possibly others.
Needs to check DXF version references, what is intended and if there are possible issues.
After fixing LibreCAD/LibreCAD#636 I started to fix this one too, but it turned out to become a bottomless pit. I haven't checked commit history yet, to see if this happened with some code refactoring or if it is since beginning. Also have to check if there are any different DXF references, which led to this current status. From the spreadsheet I have, showing the various variables added and removed in DXF versions, I found several places where variables don't match with version conditions. And that not only applies to the mentioned condition.