DEBUG() validation

Andrew Tridgell tridge at samba.anu.edu.au
Fri Aug 14 12:59:57 GMT 1998


One change that you will notice once I've done the commit is that I've
added the appropriate __attribute__ bits to smb.h to tell gcc to
validate the arguments to DEBUG(), so it tells you if you have passed
the wrong number of arguments or the wrong types.

This only happens if you compile with gcc, but it should help us catch
a few stupid errors. I've already found several cases where we would
have got core dumps. (like using %s but not actually passing a string!)

In general I don't like using gcc special features, but I think in
this case it is worth it. 

Also, some of you may not know how to get compiler options without
editing the auto generated Makefile. What you do is this:

CFLAGS="-Wall" ./configure

assuming you use bash. (otherise set the env variable as your shell
requires).



More information about the samba-technical mailing list