Get rid of a lot of compiler warning messages

This commit is contained in:
Marty Kraimer
1997-04-30 19:22:22 +00:00
parent 67fbf5b746
commit 32a847087d
4 changed files with 16 additions and 25 deletions
+2 -11
View File
@@ -14,9 +14,6 @@
char *banner[] =
{
"#ifndef lint",
"static char yysccsid[] = \"@(#)yaccpar (JRW version from 1.9 (Berkeley) 02/21/93)\";",
"#endif",
"#define YYBYACC 1",
"#define YYMAJOR 1",
"#define YYMINOR 9",
@@ -64,7 +61,9 @@ char *header[] =
"#define YYMAXDEPTH 500",
"#endif",
"#endif",
"#if YYDEBUG", /* MRK */
"static int yydebug;", /* JRW */
"#endif", /* MRK */
"static int yynerrs;", /* JRW */
"static int yyerrflag;", /* JRW */
"static int yychar;", /* JRW */
@@ -155,15 +154,7 @@ char *body[] =
" goto yyreduce;",
" }",
" if (yyerrflag) goto yyinrecovery;",
"#ifdef lint",
" goto yynewerror;",
"#endif",
"yynewerror:",
" yyerror(\"syntax error\");",
"#ifdef lint",
" goto yyerrlab;",
"#endif",
"yyerrlab:",
" ++yynerrs;",
"yyinrecovery:",
" if (yyerrflag < 3)",
+4 -4
View File
@@ -457,7 +457,7 @@ char *char_map;
printf( "if ( yy_current_state >= %d )\n", lastdfa + 2 );
indent_up();
indent_puts( "yy_c = yy_meta[yy_c];" );
indent_puts( "yy_c = yy_meta[(int)yy_c];" );
indent_down();
}
@@ -477,7 +477,7 @@ void gen_next_match()
/* NOTE - changes in here should be reflected in gen_next_state() and
* gen_NUL_trans()
*/
char *char_map = useecs ? "yy_ec[*yy_cp]" : "*yy_cp";
char *char_map = useecs ? "yy_ec[(int)*yy_cp]" : "*yy_cp";
char *char_map_2 = useecs ? "yy_ec[*++yy_cp]" : "*++yy_cp";
if ( fulltbl )
@@ -576,13 +576,13 @@ int worry_about_NULs;
if ( worry_about_NULs && ! nultrans )
{
if ( useecs )
(void) sprintf( char_map, "(*yy_cp ? yy_ec[*yy_cp] : %d)", NUL_ec );
(void) sprintf( char_map, "(*yy_cp ? yy_ec[(int)*yy_cp] : %d)", NUL_ec );
else
(void) sprintf( char_map, "(*yy_cp ? *yy_cp : %d)", NUL_ec );
}
else
(void) strcpy( char_map, useecs ? "yy_ec[*yy_cp]" : "*yy_cp" );
(void) strcpy( char_map, useecs ? "yy_ec[(int)*yy_cp]" : "*yy_cp" );
if ( worry_about_NULs && nultrans )
{
+5 -5
View File
@@ -950,7 +950,7 @@ YY_DECL
yy_match:
do
{
register YY_CHAR yy_c = yy_ec[*yy_cp];
register YY_CHAR yy_c = yy_ec[(int)*yy_cp];
if ( yy_accept[yy_current_state] )
{
yy_last_accepting_state = yy_current_state;
@@ -960,7 +960,7 @@ yy_match:
{
yy_current_state = yy_def[yy_current_state];
if ( yy_current_state >= 341 )
yy_c = yy_meta[yy_c];
yy_c = yy_meta[(int)yy_c];
}
yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
++yy_cp;
@@ -1952,7 +1952,7 @@ static yy_state_type yy_get_previous_state()
for ( yy_cp = yytext + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp )
{
register YY_CHAR yy_c = (*yy_cp ? yy_ec[*yy_cp] : 1);
register YY_CHAR yy_c = (*yy_cp ? yy_ec[(int)*yy_cp] : 1);
if ( yy_accept[yy_current_state] )
{
yy_last_accepting_state = yy_current_state;
@@ -1962,7 +1962,7 @@ static yy_state_type yy_get_previous_state()
{
yy_current_state = yy_def[yy_current_state];
if ( yy_current_state >= 341 )
yy_c = yy_meta[yy_c];
yy_c = yy_meta[(int)yy_c];
}
yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
}
@@ -1998,7 +1998,7 @@ register yy_state_type yy_current_state;
{
yy_current_state = yy_def[yy_current_state];
if ( yy_current_state >= 341 )
yy_c = yy_meta[yy_c];
yy_c = yy_meta[(int)yy_c];
}
yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
yy_is_jam = (yy_current_state == 340);
+5 -5
View File
@@ -951,7 +951,7 @@ YY_DECL
yy_match:
do
{
register YY_CHAR yy_c = yy_ec[*yy_cp];
register YY_CHAR yy_c = yy_ec[(int)*yy_cp];
if ( yy_accept[yy_current_state] )
{
yy_last_accepting_state = yy_current_state;
@@ -961,7 +961,7 @@ yy_match:
{
yy_current_state = yy_def[yy_current_state];
if ( yy_current_state >= 341 )
yy_c = yy_meta[yy_c];
yy_c = yy_meta[(int)yy_c];
}
yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
++yy_cp;
@@ -1953,7 +1953,7 @@ static yy_state_type yy_get_previous_state()
for ( yy_cp = yytext + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp )
{
register YY_CHAR yy_c = (*yy_cp ? yy_ec[*yy_cp] : 1);
register YY_CHAR yy_c = (*yy_cp ? yy_ec[(int)*yy_cp] : 1);
if ( yy_accept[yy_current_state] )
{
yy_last_accepting_state = yy_current_state;
@@ -1963,7 +1963,7 @@ static yy_state_type yy_get_previous_state()
{
yy_current_state = yy_def[yy_current_state];
if ( yy_current_state >= 341 )
yy_c = yy_meta[yy_c];
yy_c = yy_meta[(int)yy_c];
}
yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
}
@@ -1999,7 +1999,7 @@ register yy_state_type yy_current_state;
{
yy_current_state = yy_def[yy_current_state];
if ( yy_current_state >= 341 )
yy_c = yy_meta[yy_c];
yy_c = yy_meta[(int)yy_c];
}
yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
yy_is_jam = (yy_current_state == 340);