Skip to content

Commit

Permalink
Fix unknown pragma with clang on x-deltat.y
Browse files Browse the repository at this point in the history
Also re-generate deltat.c in order to clear the warning.
  • Loading branch information
frozencemetery authored and greghudson committed Apr 12, 2017
1 parent d225fb9 commit 77c0352
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 37 deletions.
76 changes: 39 additions & 37 deletions src/lib/krb5/krb/deltat.c
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,10 @@
#ifdef __GNUC__
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wuninitialized"
#ifndef __clang__
#pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
#endif
#endif

#include "k5-int.h"
#include <ctype.h>
Expand Down Expand Up @@ -153,7 +155,7 @@ static int mylex(int *intp, struct param *tmv);
static int yyparse(struct param *);


#line 157 "deltat.c" /* yacc.c:339 */
#line 159 "deltat.c" /* yacc.c:339 */

# ifndef YY_NULLPTR
# if defined __cplusplus && 201103L <= __cplusplus
Expand Down Expand Up @@ -197,10 +199,10 @@ extern int yydebug;
typedef union YYSTYPE YYSTYPE;
union YYSTYPE
{
#line 129 "x-deltat.y" /* yacc.c:355 */
#line 131 "x-deltat.y" /* yacc.c:355 */
int val;

#line 204 "deltat.c" /* yacc.c:355 */
#line 206 "deltat.c" /* yacc.c:355 */
};
# define YYSTYPE_IS_TRIVIAL 1
# define YYSTYPE_IS_DECLARED 1
Expand All @@ -214,7 +216,7 @@ int yyparse (struct param *tmv);

/* Copy the second part of user declarations. */

#line 218 "deltat.c" /* yacc.c:358 */
#line 220 "deltat.c" /* yacc.c:358 */

#ifdef short
# undef short
Expand Down Expand Up @@ -512,9 +514,9 @@ static const yytype_uint8 yytranslate[] =
/* YYRLINE[YYN] -- Source line where rule number YYN was defined. */
static const yytype_uint8 yyrline[] =
{
0, 143, 143, 144, 144, 145, 145, 146, 146, 147,
148, 150, 151, 152, 153, 154, 155, 156, 157, 162,
163, 166, 167, 170, 171
0, 145, 145, 146, 146, 147, 147, 148, 148, 149,
150, 152, 153, 154, 155, 156, 157, 158, 159, 164,
165, 168, 169, 172, 173
};
#endif

Expand Down Expand Up @@ -1310,93 +1312,93 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default);
switch (yyn)
{
case 6:
#line 145 "x-deltat.y" /* yacc.c:1646 */
#line 147 "x-deltat.y" /* yacc.c:1646 */
{ (yyval.val) = - (yyvsp[0].val); }
#line 1316 "deltat.c" /* yacc.c:1646 */
#line 1318 "deltat.c" /* yacc.c:1646 */
break;

case 9:
#line 147 "x-deltat.y" /* yacc.c:1646 */
#line 149 "x-deltat.y" /* yacc.c:1646 */
{ (yyval.val) = (yyvsp[0].val); }
#line 1322 "deltat.c" /* yacc.c:1646 */
#line 1324 "deltat.c" /* yacc.c:1646 */
break;

case 10:
#line 148 "x-deltat.y" /* yacc.c:1646 */
#line 150 "x-deltat.y" /* yacc.c:1646 */
{ YYERROR; }
#line 1328 "deltat.c" /* yacc.c:1646 */
#line 1330 "deltat.c" /* yacc.c:1646 */
break;

case 11:
#line 150 "x-deltat.y" /* yacc.c:1646 */
#line 152 "x-deltat.y" /* yacc.c:1646 */
{ DO ((yyvsp[-2].val), 0, 0, (yyvsp[0].val)); }
#line 1334 "deltat.c" /* yacc.c:1646 */
#line 1336 "deltat.c" /* yacc.c:1646 */
break;

case 12:
#line 151 "x-deltat.y" /* yacc.c:1646 */
#line 153 "x-deltat.y" /* yacc.c:1646 */
{ DO ( 0, (yyvsp[-2].val), 0, (yyvsp[0].val)); }
#line 1340 "deltat.c" /* yacc.c:1646 */
#line 1342 "deltat.c" /* yacc.c:1646 */
break;

case 13:
#line 152 "x-deltat.y" /* yacc.c:1646 */
#line 154 "x-deltat.y" /* yacc.c:1646 */
{ DO ( 0, 0, (yyvsp[-2].val), (yyvsp[0].val)); }
#line 1346 "deltat.c" /* yacc.c:1646 */
#line 1348 "deltat.c" /* yacc.c:1646 */
break;

case 14:
#line 153 "x-deltat.y" /* yacc.c:1646 */
#line 155 "x-deltat.y" /* yacc.c:1646 */
{ DO ( 0, 0, 0, (yyvsp[-1].val)); }
#line 1352 "deltat.c" /* yacc.c:1646 */
#line 1354 "deltat.c" /* yacc.c:1646 */
break;

case 15:
#line 154 "x-deltat.y" /* yacc.c:1646 */
#line 156 "x-deltat.y" /* yacc.c:1646 */
{ DO ((yyvsp[-6].val), (yyvsp[-4].val), (yyvsp[-2].val), (yyvsp[0].val)); }
#line 1358 "deltat.c" /* yacc.c:1646 */
#line 1360 "deltat.c" /* yacc.c:1646 */
break;

case 16:
#line 155 "x-deltat.y" /* yacc.c:1646 */
#line 157 "x-deltat.y" /* yacc.c:1646 */
{ DO ( 0, (yyvsp[-4].val), (yyvsp[-2].val), (yyvsp[0].val)); }
#line 1364 "deltat.c" /* yacc.c:1646 */
#line 1366 "deltat.c" /* yacc.c:1646 */
break;

case 17:
#line 156 "x-deltat.y" /* yacc.c:1646 */
#line 158 "x-deltat.y" /* yacc.c:1646 */
{ DO ( 0, (yyvsp[-2].val), (yyvsp[0].val), 0); }
#line 1370 "deltat.c" /* yacc.c:1646 */
#line 1372 "deltat.c" /* yacc.c:1646 */
break;

case 18:
#line 157 "x-deltat.y" /* yacc.c:1646 */
#line 159 "x-deltat.y" /* yacc.c:1646 */
{ DO ( 0, 0, 0, (yyvsp[0].val)); }
#line 1376 "deltat.c" /* yacc.c:1646 */
#line 1378 "deltat.c" /* yacc.c:1646 */
break;

case 20:
#line 163 "x-deltat.y" /* yacc.c:1646 */
#line 165 "x-deltat.y" /* yacc.c:1646 */
{ if (HOUR_NOT_OK((yyvsp[-2].val))) YYERROR;
DO_SUM((yyval.val), (yyvsp[-2].val) * 3600, (yyvsp[0].val)); }
#line 1383 "deltat.c" /* yacc.c:1646 */
#line 1385 "deltat.c" /* yacc.c:1646 */
break;

case 22:
#line 167 "x-deltat.y" /* yacc.c:1646 */
#line 169 "x-deltat.y" /* yacc.c:1646 */
{ if (MIN_NOT_OK((yyvsp[-2].val))) YYERROR;
DO_SUM((yyval.val), (yyvsp[-2].val) * 60, (yyvsp[0].val)); }
#line 1390 "deltat.c" /* yacc.c:1646 */
#line 1392 "deltat.c" /* yacc.c:1646 */
break;

case 23:
#line 170 "x-deltat.y" /* yacc.c:1646 */
#line 172 "x-deltat.y" /* yacc.c:1646 */
{ (yyval.val) = 0; }
#line 1396 "deltat.c" /* yacc.c:1646 */
#line 1398 "deltat.c" /* yacc.c:1646 */
break;


#line 1400 "deltat.c" /* yacc.c:1646 */
#line 1402 "deltat.c" /* yacc.c:1646 */
default: break;
}
/* User semantic actions sometimes alter yychar, and that requires
Expand Down Expand Up @@ -1624,7 +1626,7 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default);
#endif
return yyresult;
}
#line 173 "x-deltat.y" /* yacc.c:1906 */
#line 175 "x-deltat.y" /* yacc.c:1906 */


#ifdef __GNUC__
Expand Down
2 changes: 2 additions & 0 deletions src/lib/krb5/krb/x-deltat.y
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,10 @@
#ifdef __GNUC__
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wuninitialized"
#ifndef __clang__
#pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
#endif
#endif

#include "k5-int.h"
#include <ctype.h>
Expand Down

0 comments on commit 77c0352

Please sign in to comment.