From: Marc Dionne Date: Sat, 2 Mar 2013 15:06:47 +0000 (-0500) Subject: crypto: make krb5_enomem a static inline function X-Git-Tag: upstream/1.8.0_pre1^2~1375 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=bdd9ad146c8a3d05b926dba3e01299ce79cd5ad3;p=packages%2Fo%2Fopenafs.git 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 --- 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 */