From 0bd769c62da316a04b0a0a63b844405ae6dc5e80 Mon Sep 17 00:00:00 2001 From: Ken Raeburn Date: Wed, 7 Dec 2005 23:14:08 +0000 Subject: [PATCH] * k5-thread.h (k5_mutex_lock_update_stats) [__GNUC__]: Use an inline function, to avoid "statement with no effect" warnings. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@17554 dc483132-0cff-0310-8789-dd5450dbe970 --- src/include/ChangeLog | 5 +++++ src/include/k5-thread.h | 9 ++++++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/src/include/ChangeLog b/src/include/ChangeLog index 65db7475b..4ba978fc5 100644 --- a/src/include/ChangeLog +++ b/src/include/ChangeLog @@ -1,3 +1,8 @@ +2005-12-07 Ken Raeburn + + * k5-thread.h (k5_mutex_lock_update_stats) [__GNUC__]: Use an + inline function, to avoid "statement with no effect" warnings. + 2005-10-20 Jeffrey Altman * win-mac.h: diff --git a/src/include/k5-thread.h b/src/include/k5-thread.h index e82d7bbde..ea71bf499 100644 --- a/src/include/k5-thread.h +++ b/src/include/k5-thread.h @@ -247,7 +247,14 @@ typedef char k5_debug_mutex_stats; #define K5_MUTEX_STATS_INIT 's' typedef int k5_mutex_stats_tmp; #define k5_mutex_stats_start() (0) -#define k5_mutex_lock_update_stats(M,S) (S) +#ifdef __GNUC__ +static inline void +k5_mutex_lock_update_stats(k5_debug_mutex_stats *m, k5_mutex_stats_tmp t) +{ +} +#else +# define k5_mutex_lock_update_stats(M,S) (S) +#endif #define k5_mutex_unlock_update_stats(M) (*(M) = 's') /* If statistics tracking isn't enabled, these functions don't actually -- 2.26.2