[ofa-general] [PATCH] opensm/osm_qos_parser: fixed compilation on byacc

Hal Rosenstock hrosenstock at xsigo.com
Wed Mar 12 11:40:48 PDT 2008


Hi Yevgeny,

On Wed, 2008-03-12 at 18:12 +0200, Yevgeny Kliteynik wrote:
> Hi Hal,
> 
> Hal Rosenstock wrote:
> > Hi Yevgeny,
> > 
> > On Mon, 2008-03-10 at 16:56 +0200, Yevgeny Kliteynik wrote:
> >> Hi Sasha.
> >>
> >> Fixing compilation with byacc (bug 932).
> >> Please apply to ofed_1_3 and master.
> >>
> >> -- Yevgeny
> >>
> >> Signed-off-by: Yevgeny Kliteynik <kliteyn at dev.mellanox.co.il>
> >> ---
> >>  opensm/opensm/osm_qos_parser.l |    1 +
> >>  opensm/opensm/osm_qos_parser.y |    1 +
> >>  2 files changed, 2 insertions(+), 0 deletions(-)
> >>
> >> diff --git a/opensm/opensm/osm_qos_parser.l b/opensm/opensm/osm_qos_parser.l
> >> index 41f8720..32e8ab3 100644
> >> --- a/opensm/opensm/osm_qos_parser.l
> >> +++ b/opensm/opensm/osm_qos_parser.l
> >> @@ -56,6 +56,7 @@ static void save_pos();
> >>  extern int column_num;
> >>  extern int line_num;
> >>  extern FILE * __qos_parser_in;
> >> +extern YYSTYPE __qos_parser_lval;
> >>
> >>  boolean_t in_description = FALSE;
> >>  boolean_t in_list_of_hex_num_ranges = FALSE;
> >> diff --git a/opensm/opensm/osm_qos_parser.y b/opensm/opensm/osm_qos_parser.y
> >> index 6595091..040c355 100644
> >> --- a/opensm/opensm/osm_qos_parser.y
> >> +++ b/opensm/opensm/osm_qos_parser.y
> >> @@ -149,6 +149,7 @@ extern char * __qos_parser_text;
> >>  extern int __qos_parser_lex (void);
> >>  extern FILE * __qos_parser_in;
> >>  extern int errno;
> >> +int __qos_parser_parse();
> >>
> >>  #define RESET_BUFFER  __parser_tmp_struct_reset()
> > 
> > Are the following warnings benign:
> > 
> > osm_qos_parser.tab.c: In function `__qos_parser_parse':
> > osm_qos_parser.tab.c:1723: warning: suggest parentheses around assignment used as truth value
> > osm_qos_parser.tab.c:1771: warning: label `yyerrlab' defined but not used
> > osm_qos_parser.tab.c:1766: warning: label `yynewerror' defined but not used
> > ../include/complib/cl_qcomppool.h: At top level:
> > osm_qos_parser_y.c:2: warning: `yysccsid' defined but not used
> > 
> > Also, have you tested regressed this with some QoS setup ?
> 
> What version of byacc do you have? 

1.9.1-1.1

> What distro?

Debian 3.1 with some local fixes and updates

-- Hal

> I checked it on RH4U4 with bison and byacc - no warnings, and parser works fine.
> 
> -- Yevgeny
> 
> > Thanks.
> > 
> > -- Hal
> > 
> 



More information about the general mailing list