Fix a bunch of warnings on 64 bit platforms in the

CISS_DEBUG case by appropriately using %z and %j.
This commit is contained in:
Maxime Henrion 2002-10-27 12:27:04 +00:00
parent 5d10e1f7df
commit 4caad4e81d
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=106039
2 changed files with 5 additions and 4 deletions

View file

@ -76,6 +76,7 @@
#include <sys/conf.h>
#include <sys/devicestat.h>
#include <sys/stat.h>
#include <sys/stdint.h>
#include <cam/cam.h>
#include <cam/cam_ccb.h>

View file

@ -261,11 +261,11 @@ struct ciss_softc
do { \
if (level <= CISS_DEBUG) printf("%s: called\n", __func__); \
} while(0)
# define debug_struct(s) printf(" SIZE %s: %d\n", #s, sizeof(struct s))
# define debug_union(s) printf(" SIZE %s: %d\n", #s, sizeof(union s))
# define debug_type(s) printf(" SIZE %s: %d\n", #s, sizeof(s))
# define debug_struct(s) printf(" SIZE %s: %zu\n", #s, sizeof(struct s))
# define debug_union(s) printf(" SIZE %s: %zu\n", #s, sizeof(union s))
# define debug_type(s) printf(" SIZE %s: %zu\n", #s, sizeof(s))
# define debug_field(s, f) printf(" OFFSET %s.%s: %d\n", #s, #f, ((int)&(((struct s *)0)->f)))
# define debug_const(c) printf(" CONST %s %d/0x%x\n", #c, c, c);
# define debug_const(c) printf(" CONST %s %jd/0x%jx\n", #c, (intmax_t)c, (intmax_t)c);
#else
# define debug(level, fmt, args...)
# define debug_called(level)