From 789c3451ba000f7c9665742890b305e2e7938add Mon Sep 17 00:00:00 2001 From: Simon Wilkinson Date: Tue, 21 Jul 2009 20:58:36 +0100 Subject: [PATCH] Fix warnings in comerr directory Prototype yylex in error_table.y to remove warning Fix the bizarre definition of LOCK_ET_LIST so that it upsets neither the compiler, nor the reader. Reviewed-on: http://gerrit.openafs.org/http://gerrit.openafs.org/169 Reviewed-by: Jeffrey Altman Tested-by: Russ Allbery Reviewed-by: Russ Allbery --- src/comerr/error_msg.c | 3 ++- src/comerr/error_table.y | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/comerr/error_msg.c b/src/comerr/error_msg.c index b00284b60..afa0c971f 100644 --- a/src/comerr/error_msg.c +++ b/src/comerr/error_msg.c @@ -54,7 +54,8 @@ et_mutex_once(void) #define LOCK_ET_LIST \ do { \ - (et_list_done || pthread_once(&et_list_once, et_mutex_once)); \ + if (!et_list_done) \ + pthread_once(&et_list_once, et_mutex_once); \ assert(pthread_mutex_lock(&et_list_mutex)==0); \ } while (0) #define UNLOCK_ET_LIST assert(pthread_mutex_unlock(&et_list_mutex)==0) diff --git a/src/comerr/error_table.y b/src/comerr/error_table.y index 97dc91ae0..d68bd7018 100644 --- a/src/comerr/error_table.y +++ b/src/comerr/error_table.y @@ -59,6 +59,8 @@ void put_ecs(void); void set_table_num(char *string); void set_table_fun(char *astring); +extern int yylex (void); + %} %union { char *dynstr; -- 2.39.5