From 50b19bc74f1d7a88cefa729f3ac1ea2c32d3f271 Mon Sep 17 00:00:00 2001 From: Marty Kraimer Date: Wed, 30 Apr 1997 18:26:53 +0000 Subject: [PATCH] fix compiler warning messages --- src/as/asCa.c | 2 +- src/as/asDbLib.c | 1 + src/as/asLib_lex.l | 6 +++++- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/as/asCa.c b/src/as/asCa.c index 2cf4d8dbe..aa64d0ed1 100644 --- a/src/as/asCa.c +++ b/src/as/asCa.c @@ -127,7 +127,7 @@ LOCAL void eventCallback(struct event_handler_args eha) ASGINP *pasginp; CAPVT *pcapvt; ASG *pasg; - struct dbr_sts_double *pdata = eha.dbr; + READONLY struct dbr_sts_double *pdata = eha.dbr; int Ilocked=FALSE; if(!caInitializing) { diff --git a/src/as/asDbLib.c b/src/as/asDbLib.c index 06d9e7db2..bada3f21c 100644 --- a/src/as/asDbLib.c +++ b/src/as/asDbLib.c @@ -65,6 +65,7 @@ DEVELOPMENT CENTER AT ARGONNE NATIONAL LABORATORY (708-252-2000). #include #include #include +#include #include #include #include diff --git a/src/as/asLib_lex.l b/src/as/asLib_lex.l index 43f1d23bd..d17026950 100644 --- a/src/as/asLib_lex.l +++ b/src/as/asLib_lex.l @@ -8,7 +8,7 @@ static ASINPUTFUNCPTR *my_yyinput; #undef YY_INPUT #define YY_INPUT(b,r,ms) (r=(*my_yyinput)(b,ms)) -yyreset() +static int yyreset() { line_num=1; BEGIN INITIAL; @@ -66,9 +66,13 @@ INP[A-L] {/* If A-L is changed then ASMAXINP must also be changed*/ \n { line_num ++;} . { char message[20]; + YY_BUFFER_STATE *dummy=0; sprintf(message,"invalid character '%c'",yytext[0]); yyerror(message); + /*The following suppresses compiler warning messages*/ + if(FALSE) yyunput('c',message); + if(FALSE) yy_switch_to_buffer(*dummy); } %%