different variable types in tdb.c

andreas moroder claudiamoroder at st-ulrich.suedtirol.net
Tue Aug 14 20:33:54 GMT 2001


Hello,

I did run lclint ( YES I really did it ) over the tdb.c file. I got thousand, 
no billions of warnings. Most of them are not worth checking except the 
warnings about different types.

at line 150  	fl.l_type = rw_type;   l_type is short int , rw_type MAY be 
they are the same, but I don't know if it is guaranted on every machine


at line tdb->locked[list+1].ltype = ltype;    int is assigned to unsigned int

Another proble are the functions that return values that are never checked.

At line 610 the return value of tdb_oob is ignored.
At line 207 tdb_spinunlock 

and many more.

Most of the functions seem to give back valuable return values, so they 
should all be checked.

If anyone of the main developers wants to test lint on tdb. Here is how to 
call it


lclint tdb.c -DSTANDALONE -I/opt/samba/source/include 
-I/opt/samba/source/ubiqx -I/opt/samba/source -I/opt/samba/source/smbwrapper 
-D__gnuc_va_list=va_arg +posixlib +ptrnegate  | more





More information about the samba-technical mailing list