[patch] Fix various compilation warnings (gcc 4.4.3 linux) June 10, 2010, 08:27:34 pm Hi,There were a few warnings when compiling using gcc 4.4.3 (linux 64-bit), so I took a stab at silencing the easy ones.1) There were a bunch of "comparison between signed and unsigned integer" warnings. In most cases, the signed integer was already guaranteed to be positive. In the remaining cases, converting to unsigned produced the correct behaviour for negative values, so this was done for all cases, using an appropriate unsigned type.2) There were some "format not a string literal and no format arguments" warnings. I simply changed the sprintf() in these cases to tstrncpy() as seems to be the solution used elsewhere.I don't really have much knowledge of integer types and endian-ness, but I'm fairly confident I chose the correct solution in each case.The only warnings left after this are a couple unused variables and a couple cases of "casting away constness".This was a "git diff", but it should apply to current SVN trunk using "patch -p1 < fix-warnings.patch". Quote Selected
Re: [patch] Fix various compilation warnings (gcc 4.4.3 linux) Reply #1 – June 10, 2010, 09:38:33 pm Thank you Quote Selected