<div dir="ltr">Hi,<br><div><br></div><div>I've recently started to build with "--extra-cppflags=-O3", to investigate if incidental loss of transport stream packets can be related to runtime performance.</div><div>To my surprise I do then get a lot of "null pointer dereference" and "possible null pointer dereference" compilation warnings. This is with Fedora-32 and gcc 10.2.1.</div><div><br></div><div>I have the impression that these warnings are just wrong.</div><div><br></div><div>This is for the following reasons:</div><div>- The code that is flagged runs already for years and years. If there was a null pointer dereference I think that somebody would have noticed this. The word "segfault" comes to the mind.</div><div>- There are several warnings about class DTVChannelInfo declared in file dtvconfparser.h. The interesting bit is that when I change the order of the class variables, e.g. move "QString m_name" two lines up, that some of the "null pointer dereference" warnings disappear. This is not logical; the order of the class members should not determine if code is valid or not. As far as I know of course.</div><div>- When compiled with "-O3  -fno-inline" then all "null pointer dereference"warnings but one do disappear. This is again not logical to me. Possibly only when "-fno-inline" is given the "null pointer dereference" warnings are correct.</div><div><br></div><div>Considering this I do not think it is a good idea to rewrite the code to satisfy the compiler.</div><div><br></div><div>One way to deal with this is to remove the "-Wnull-dereference" option from the standard set of compiler flags.</div><div><br></div><div>What I want to achieve is to build fully optimized without getting warnings, so that if there is a warning it is something that needs to be looked at.</div><div><br></div><div>Anybody an opinion on this?</div><div><br></div><div>Kind regards,</div><div>Klaas.</div><div><br></div></div>