From: Simon Wilkinson Date: Tue, 21 Jul 2009 19:58:36 +0000 (+0100) Subject: Fix warnings in comerr directory X-Git-Tag: openafs-devel-1_5_61~72 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=789c3451ba000f7c9665742890b305e2e7938add;p=packages%2Fo%2Fopenafs.git 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 --- 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;