Permalink
Browse files

ticket: 7080

Suppress maybe-uninitialized warning in x-deltat.y

Recent versions of gcc can generate a maybe-uninitialized warning from
bison output instead of a regular uninitialized warning.  Suppress
both.  Fix from nalin@redhat.com.

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@25665 dc483132-0cff-0310-8789-dd5450dbe970
  • Loading branch information...
1 parent 1d88207 commit 18e303107321c7f565d90111bf54d2ecb4901f4b ghudson committed Jan 27, 2012
Showing with 25 additions and 23 deletions.
  1. +24 −23 src/lib/krb5/krb/deltat.c
  2. +1 −0 src/lib/krb5/krb/x-deltat.y
View
47 src/lib/krb5/krb/deltat.c
@@ -77,6 +77,7 @@
#ifdef __GNUC__
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wuninitialized"
+#pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
#endif
#include <ctype.h>
@@ -163,7 +164,7 @@ static int yyparse (void *);
/* Line 189 of yacc.c */
-#line 167 "deltat.c"
+#line 168 "deltat.c"
/* Enabling traces. */
#ifndef YYDEBUG
@@ -204,12 +205,12 @@ typedef union YYSTYPE
{
/* Line 214 of yacc.c */
-#line 134 "x-deltat.y"
+#line 135 "x-deltat.y"
int val;
/* Line 214 of yacc.c */
-#line 213 "deltat.c"
+#line 214 "deltat.c"
} YYSTYPE;
# define YYSTYPE_IS_TRIVIAL 1
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
@@ -221,7 +222,7 @@ typedef union YYSTYPE
/* Line 264 of yacc.c */
-#line 225 "deltat.c"
+#line 226 "deltat.c"
#ifdef short
# undef short
@@ -512,9 +513,9 @@ static const yytype_int8 yyrhs[] =
/* YYRLINE[YYN] -- source line where rule number YYN was defined. */
static const yytype_uint8 yyrline[] =
{
- 0, 145, 145, 146, 146, 147, 147, 148, 148, 149,
- 150, 152, 153, 154, 155, 156, 157, 158, 159, 163,
- 164, 167, 168, 171, 172
+ 0, 146, 146, 147, 147, 148, 148, 149, 149, 150,
+ 151, 153, 154, 155, 156, 157, 158, 159, 160, 164,
+ 165, 168, 169, 172, 173
};
#endif
@@ -1442,107 +1443,107 @@ YYSTYPE yylval;
case 6:
/* Line 1464 of yacc.c */
-#line 147 "x-deltat.y"
+#line 148 "x-deltat.y"
{ (yyval.val) = - (yyvsp[(2) - (2)].val); ;}
break;
case 9:
/* Line 1464 of yacc.c */
-#line 149 "x-deltat.y"
+#line 150 "x-deltat.y"
{ (yyval.val) = (yyvsp[(2) - (2)].val); ;}
break;
case 10:
/* Line 1464 of yacc.c */
-#line 150 "x-deltat.y"
+#line 151 "x-deltat.y"
{ YYERROR; ;}
break;
case 11:
/* Line 1464 of yacc.c */
-#line 152 "x-deltat.y"
+#line 153 "x-deltat.y"
{ DO ((yyvsp[(1) - (3)].val), 0, 0, (yyvsp[(3) - (3)].val)); ;}
break;
case 12:
/* Line 1464 of yacc.c */
-#line 153 "x-deltat.y"
+#line 154 "x-deltat.y"
{ DO ( 0, (yyvsp[(1) - (3)].val), 0, (yyvsp[(3) - (3)].val)); ;}
break;
case 13:
/* Line 1464 of yacc.c */
-#line 154 "x-deltat.y"
+#line 155 "x-deltat.y"
{ DO ( 0, 0, (yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); ;}
break;
case 14:
/* Line 1464 of yacc.c */
-#line 155 "x-deltat.y"
+#line 156 "x-deltat.y"
{ DO ( 0, 0, 0, (yyvsp[(1) - (2)].val)); ;}
break;
case 15:
/* Line 1464 of yacc.c */
-#line 156 "x-deltat.y"
+#line 157 "x-deltat.y"
{ DO ((yyvsp[(1) - (7)].val), (yyvsp[(3) - (7)].val), (yyvsp[(5) - (7)].val), (yyvsp[(7) - (7)].val)); ;}
break;
case 16:
/* Line 1464 of yacc.c */
-#line 157 "x-deltat.y"
+#line 158 "x-deltat.y"
{ DO ( 0, (yyvsp[(1) - (5)].val), (yyvsp[(3) - (5)].val), (yyvsp[(5) - (5)].val)); ;}
break;
case 17:
/* Line 1464 of yacc.c */
-#line 158 "x-deltat.y"
+#line 159 "x-deltat.y"
{ DO ( 0, (yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val), 0); ;}
break;
case 18:
/* Line 1464 of yacc.c */
-#line 159 "x-deltat.y"
+#line 160 "x-deltat.y"
{ DO ( 0, 0, 0, (yyvsp[(1) - (1)].val)); ;}
break;
case 20:
/* Line 1464 of yacc.c */
-#line 164 "x-deltat.y"
+#line 165 "x-deltat.y"
{ if (HOUR_NOT_OK((yyvsp[(1) - (3)].val))) YYERROR;
DO_SUM((yyval.val), (yyvsp[(1) - (3)].val) * 3600, (yyvsp[(3) - (3)].val)); ;}
break;
case 22:
/* Line 1464 of yacc.c */
-#line 168 "x-deltat.y"
+#line 169 "x-deltat.y"
{ if (MIN_NOT_OK((yyvsp[(1) - (3)].val))) YYERROR;
DO_SUM((yyval.val), (yyvsp[(1) - (3)].val) * 60, (yyvsp[(3) - (3)].val)); ;}
break;
case 23:
/* Line 1464 of yacc.c */
-#line 171 "x-deltat.y"
+#line 172 "x-deltat.y"
{ (yyval.val) = 0; ;}
break;
/* Line 1464 of yacc.c */
-#line 1546 "deltat.c"
+#line 1547 "deltat.c"
default: break;
}
YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
@@ -1754,7 +1755,7 @@ YYSTYPE yylval;
/* Line 1684 of yacc.c */
-#line 174 "x-deltat.y"
+#line 175 "x-deltat.y"
#ifdef __GNUC__
View
1 src/lib/krb5/krb/x-deltat.y
@@ -44,6 +44,7 @@
#ifdef __GNUC__
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wuninitialized"
+#pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
#endif
#include <ctype.h>

0 comments on commit 18e3031

Please sign in to comment.