> > I did compile latest CVS with
> > -O3 -g -std=c99 -pedantic -W -Wall
> > 
> > and fixed all warnings that came up. The attached patch is a proposal only 
> > as 
> > 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:
http://gcc.gnu.org/onlinedocs/cpp/Variadic-Macros.html

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 looked 
correctly,
those variables are only counted from zero up. I'll split that from the rest 
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 >= 3. I've just 
put it in because gcc
(with above options) complains about unused variables.

HS


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Openobex-users mailing list
[email protected]
http://lists.sourceforge.net/lists/listinfo/openobex-users

Reply via email to