From ddb8f23a09603f44dd93a84952a9bbe1acc5e9cc Mon Sep 17 00:00:00 2001 From: David Lawrence Date: Fri, 13 Apr 2001 02:26:32 +0000 Subject: [PATCH] a different approach to shutting up compilers about an empty file, one that does not cause all the compilers to complain about a variable being defined but not used. --- lib/isc/nothreads/condition.c | 16 ++++++++++++---- lib/isc/nothreads/mutex.c | 12 ++++++++---- 2 files changed, 20 insertions(+), 8 deletions(-) diff --git a/lib/isc/nothreads/condition.c b/lib/isc/nothreads/condition.c index f3e5ea6d24..3c346c6fa9 100644 --- a/lib/isc/nothreads/condition.c +++ b/lib/isc/nothreads/condition.c @@ -15,10 +15,18 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: condition.c,v 1.3 2001/04/12 22:26:40 tale Exp $ */ +/* $Id: condition.c,v 1.4 2001/04/13 02:26:30 tale Exp $ */ /* - * This file intentionally left blank. The useless static variable below - * stops some compilers from complaining about an empty file. + * This file intentionally left blank. */ -static int isc_condition_file_not_used; + +/* + * Well, not completely. The stupid hack below shuts up compilers + * from complaining about an empty file. + */ +static void +isc_condition_nothreads(void) { + isc_condition_nothreads(); +} + diff --git a/lib/isc/nothreads/mutex.c b/lib/isc/nothreads/mutex.c index 75c5523407..a455bd3c2d 100644 --- a/lib/isc/nothreads/mutex.c +++ b/lib/isc/nothreads/mutex.c @@ -15,10 +15,14 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: mutex.c,v 1.3 2001/04/12 22:26:41 tale Exp $ */ +/* $Id: mutex.c,v 1.4 2001/04/13 02:26:32 tale Exp $ */ /* - * This file intentionally left blank. The useless static variable below - * stops some compilers from complaining about an empty file. + * Well, not completely. The stupid hack below shuts up compilers + * from complaining about an empty file. */ -static int isc_mutex_file_not_used; +static void +isc_mutex_nothreads(void) { + isc_mutex_nothreads(); +} +