On Darwin 100, we have
#define crfree(X) kauth_cred_unref(&X)
which expands in one place to
kauth_cred_unref(&(afs_ucred_t *)avc->linkData)
clang warns about this in -Werror mode, because arguments to the
address-of operator must be lvalues.
To fix this make crfree an inline function, which will then let us do
the indirection required.
Change-Id: Ic5adb63dcdc11e04c1e428c32e85f33a987fcf42
Reviewed-on: http://gerrit.openafs.org/7073
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
#include <sys/lock.h>
#include <sys/user.h>
#include <sys/vnode.h>
+#include <sys/kauth.h>
#endif
#include <kern/thread.h>
#define crref kauth_cred_get_with_ref
#define crhold kauth_cred_ref
#ifdef AFS_DARWIN100_ENV
-#define crfree(X) kauth_cred_unref(&X)
+static inline void crfree(kauth_cred_t X) { kauth_cred_unref(&X); }
#else
#define crfree kauth_cred_rele
#endif