On 20 Aug 2015 at 17:46, Scott Doctor <scott at scottdoctor.com> wrote:
> My opinion is to keep it portable. The warning is there for a reason. > you are worried about performance yet are calling a function that does > nothing, which will take more memory cycles than a simple check for zero. > > Trying to memset a zero length is a bug, not the warning. Add an if > statement around it. If the variable is local, it will probably be > optimized as a register variable and a zero check of a register is a > single op-code. > > the problem with disabling warnings is that even if this instance is not > an error, some other part of the code may end up with the same situation > but is an error in the coding. I would prefer code that can be compiled > with all warnings turned on that gives no warnings than have a potential > problem because of a glitch in the code. I take it that you and others have read: http://www.sqlite.org/faq.html#q17 -- Cheers -- Tim