From: Hendrik Sattler <post@he...> - 2007-01-29 08:12:54
> > I did compile latest CVS with
> > -O3 -g -std=3Dc99 -pedantic -W -Wall
> > and fixed all warnings that came up. The attached patch is a proposal o=
> > it touches many files. It breaks the previously posted win32 patchset.
> > And it definitely needs a second pair of eyes on it!
> removing the extra "n" from the DEBUG lines looks fine to me and is the
> right way to do. However changes like this:
> - DEBUG(4, "Adress problem");
> + DEBUG(4, "%s", "Adress problem");
> are wrong. If this is for some reason a problem with C99 then we have to
> fix the DEBUG() macro and not it calling.
The problem is described in details at:
You can choose one solution from there. For the above, the also suggest:
DEBUG(4, "Address problem", );
Looks strange to me, though.
> The size_t change look good, but they might need an extra test run on
> 32-bit and 64-bit platforms. And we must make sure that we don't have
> any signedness now and so potential overflows. Remember that size_t is
> unsigned while int was signed.
That was exactly the problem (signed was compared with unsigned). If I look=
those variables are only counted from zero up. I'll split that from the res=
t and take a deeper look.
> While the __unused doesn't hurt anybody, I am not sure if all compilers
> can really deal with it.
It is a macro and a comment (for lint) for everything but GCC >=3D 3. I've =
just put it in because gcc
(with above options) complains about unused variables.