summaryrefslogtreecommitdiff
path: root/usr/src
diff options
context:
space:
mode:
authorToomas Soome <tsoome@me.com>2017-08-07 16:14:34 +0300
committerRichard Lowe <richlowe@richlowe.net>2017-10-11 18:32:57 -0400
commit571b0a139da53a3aae3b5d2370166c572eb7655c (patch)
treedc401b2bc11c08e76abd77a1eed405c46b83a580 /usr/src
parentcb6094b49723102fbd2e4f7c29be6a0a9dcabdfc (diff)
downloadillumos-gate-571b0a139da53a3aae3b5d2370166c572eb7655c.tar.gz
8696 genunix: auditsys variable 'model' set but not used
Reviewed by: Yuri Pankov <yuripv@gmx.com> Reviewed by: Robert Mustacchi <rm@joyent.com> Approved by: Richard Lowe <richlowe@richlowe.net>
Diffstat (limited to 'usr/src')
-rw-r--r--usr/src/uts/common/sys/model.h11
1 files changed, 4 insertions, 7 deletions
diff --git a/usr/src/uts/common/sys/model.h b/usr/src/uts/common/sys/model.h
index d3286ad1ec..fab96bbe00 100644
--- a/usr/src/uts/common/sys/model.h
+++ b/usr/src/uts/common/sys/model.h
@@ -156,20 +156,17 @@ typedef unsigned int model_t;
#define STRUCT_HANDLE(struct_type, handle) \
struct { \
struct struct_type *ptr; \
- } handle = { NULL }
+ model_t model; \
+ } handle = { NULL, DATAMODEL_ILP32 }
#define STRUCT_DECL(struct_type, handle) \
struct struct_type __##handle##_buf; \
STRUCT_HANDLE(struct_type, handle)
-#ifdef __lint
-#define STRUCT_SET_HANDLE(handle, umodel, addr) \
- (void) (umodel); \
- (handle).ptr = (addr)
-#else
#define STRUCT_SET_HANDLE(handle, umodel, addr) \
+ (handle).model = (model_t)(umodel) & DATAMODEL_MASK; \
+ ASSERT(((umodel) & DATAMODEL_MASK) == DATAMODEL_ILP32); \
(handle).ptr = (addr)
-#endif /* __lint */
#define STRUCT_INIT(handle, umodel) \
STRUCT_SET_HANDLE(handle, umodel, &__##handle##_buf)