Fix compile warning by including headers for strcasecmp and strncpy.

Also remove the unnecessary include of pthread.h.

Signed-off-by: Mark Fasheh <mfasheh@suse.de>
alloc tracking macros should declare the variable inside the C file and an
extern in the header. They had it the other way around.

Signed-off-by: Mark Fasheh <mfasheh@suse.de>
Fix minor type errors I found with sparse.

Signed-off-by: Mark Fasheh <mfasheh@suse.de>
Make a few local declarations static.

Signed-off-by: Mark Fasheh <mfasheh@suse.de>
Add support to the makefile for running sparse. Define it with some common
arguments.

Signed-off-by: Mark Fasheh <mfasheh@suse.de>
Use endian annotated types for struct hash_file_header. We replace the
byteswap functions with leXX_to_cpu/cpu_to_leXX variants with type
annotations for sparse.

Signed-off-by: Mark Fasheh <mfasheh@suse.de>
Use endian annotated types for struct block_hash.

Signed-off-by: Mark Fasheh <mfasheh@suse.de>
Use proper 8 and 16 bit types in bswap.h

Signed-off-by: Mark Fasheh <mfasheh@suse.de>
Use endian annotated types for struct file_info.

Signed-off-by: Mark Fasheh <mfasheh@suse.de>
Remove unused swapXX macros from serialize.c

Signed-off-by: Mark Fasheh <mfasheh@suse.de>
Write from correct pointer in write_header.

We want 'disk', not '&disk'.

Signed-off-by: Mark Fasheh <mfasheh@suse.de>