From a1a46df055863a267eb7a80b7961c9379bc457ec Mon Sep 17 00:00:00 2001 From: Toomas Soome Date: Tue, 8 Aug 2017 16:49:23 +0300 Subject: 8822 libsmbfs: variable set but not used Reviewed by: Gary Mills Reviewed by: ken mays Reviewed by: Yuri Pankov Approved by: Dan McDonald --- usr/src/common/smbclnt/smbfs_ntacl.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'usr/src') diff --git a/usr/src/common/smbclnt/smbfs_ntacl.c b/usr/src/common/smbclnt/smbfs_ntacl.c index 6780d891ee..dcc0d55e79 100644 --- a/usr/src/common/smbclnt/smbfs_ntacl.c +++ b/usr/src/common/smbclnt/smbfs_ntacl.c @@ -66,16 +66,16 @@ #define FREESZ(p, sz) kmem_free(p, sz) #else /* _KERNEL */ #define MALLOC(size) malloc(size) -#ifndef lint -#define FREESZ(p, sz) free(p) -#else /* lint */ +/* + * Define FREESZ() as inline function so the compiler will not + * trigger variable set but not used warning for sz in calling function. + */ /* ARGSUSED */ -static void -FREESZ(void *p, size_t sz) +static inline void +FREESZ(void *p, size_t sz __unused) { free(p); } -#endif /* lint */ #endif /* _KERNEL */ #define ERRCHK(expr) if ((error = expr) != 0) goto errout -- cgit v1.2.3