From bdd9ad146c8a3d05b926dba3e01299ce79cd5ad3 Mon Sep 17 00:00:00 2001 From: Marc Dionne Date: Sat, 2 Mar 2013 10:06:47 -0500 Subject: [PATCH] crypto: make krb5_enomem a static inline function With the recent update to the imported heimdal code, krb5_enomem is used in a few places as a simple statement that doesn't make use of the value. With the current definition, this triggers compiler warnings because the statement has no effect. Replace the definition with a static inline function that returns the expected value. Change-Id: I799022b69a43ab635560a1a5ea8f67f0a8f7230a Reviewed-on: http://gerrit.openafs.org/9335 Tested-by: BuildBot Reviewed-by: Simon Wilkinson Reviewed-by: Jeffrey Altman Reviewed-by: Derrick Brashear --- src/crypto/rfc3961/krb5_locl.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/crypto/rfc3961/krb5_locl.h b/src/crypto/rfc3961/krb5_locl.h index 4982e5f9f..79bf02255 100644 --- a/src/crypto/rfc3961/krb5_locl.h +++ b/src/crypto/rfc3961/krb5_locl.h @@ -143,7 +143,13 @@ void krb5_set_error_message(krb5_context, krb5_error_code, const char *, ...); krb5_error_code krb5_abortx(krb5_context, const char *, ...); #define krb5_clear_error_message(ctx) -#define krb5_enomem(ctx) ENOMEM + +static_inline krb5_error_code +krb5_enomem(krb5_context context) +{ + return ENOMEM; +} + /* Local prototypes. These are functions that we aren't admitting to in the * public API */ -- 2.39.5