]> granicus.if.org Git - sudo/commitdiff
Quiet compiler warning when SELinux is enabled.
authorTodd C. Miller <Todd.Miller@courtesan.com>
Fri, 30 Mar 2012 16:46:37 +0000 (12:46 -0400)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Fri, 30 Mar 2012 16:46:37 +0000 (12:46 -0400)
--HG--
branch : 1.7

toke.c
toke.l

diff --git a/toke.c b/toke.c
index 46623dbbfe985d398771cc1f70a4596ac900e70a..852cb7e22b1c526a7dd7f1e72f505b13fad603d4 100644 (file)
--- a/toke.c
+++ b/toke.c
@@ -4,7 +4,7 @@
 /* A lexical scanner generated by flex */
 
 /* Scanner skeleton version:
- * $Header: /home/cvs/openbsd/src/usr.bin/lex/flex.skl,v 1.11 2010/08/04 18:24:50 millert Exp $
+ * $Header: /cvs/src/usr.bin/lex/flex.skl,v 1.11 2010/08/04 18:24:50 millert Exp $
  */
 
 #define FLEX_SCANNER
@@ -2256,7 +2256,9 @@ case 42:
 YY_RULE_SETUP
 #line 501 "toke.l"
 {
+#ifndef HAVE_SELINUX
                        got_alias:
+#endif
                            if (!fill(yytext, yyleng))
                                yyterminate();
                            LEXTRACE("ALIAS ");
@@ -2265,7 +2267,7 @@ YY_RULE_SETUP
        YY_BREAK
 case 43:
 YY_RULE_SETUP
-#line 509 "toke.l"
+#line 511 "toke.l"
 {
                            /* no command args allowed for Defaults!/path */
                            if (!fill_cmnd(yytext, yyleng))
@@ -2276,7 +2278,7 @@ YY_RULE_SETUP
        YY_BREAK
 case 44:
 YY_RULE_SETUP
-#line 517 "toke.l"
+#line 519 "toke.l"
 {
                            BEGIN GOTCMND;
                            LEXTRACE("COMMAND ");
@@ -2286,7 +2288,7 @@ YY_RULE_SETUP
        YY_BREAK
 case 45:
 YY_RULE_SETUP
-#line 524 "toke.l"
+#line 526 "toke.l"
 {
                            /* directories can't have args... */
                            if (yytext[yyleng - 1] == '/') {
@@ -2304,7 +2306,7 @@ YY_RULE_SETUP
        YY_BREAK
 case 46:
 YY_RULE_SETUP
-#line 539 "toke.l"
+#line 541 "toke.l"
 {
                            LEXTRACE("BEGINSTR ");
                            yylval.string = NULL;
@@ -2314,7 +2316,7 @@ YY_RULE_SETUP
        YY_BREAK
 case 47:
 YY_RULE_SETUP
-#line 546 "toke.l"
+#line 548 "toke.l"
 {
                            /* a word */
                            if (!fill(yytext, yyleng))
@@ -2325,7 +2327,7 @@ YY_RULE_SETUP
        YY_BREAK
 case 48:
 YY_RULE_SETUP
-#line 554 "toke.l"
+#line 556 "toke.l"
 {
                            LEXTRACE("( ");
                            LEXRETURN('(');
@@ -2333,7 +2335,7 @@ YY_RULE_SETUP
        YY_BREAK
 case 49:
 YY_RULE_SETUP
-#line 559 "toke.l"
+#line 561 "toke.l"
 {
                            LEXTRACE(") ");
                            LEXRETURN(')');
@@ -2341,7 +2343,7 @@ YY_RULE_SETUP
        YY_BREAK
 case 50:
 YY_RULE_SETUP
-#line 564 "toke.l"
+#line 566 "toke.l"
 {
                            LEXTRACE(", ");
                            LEXRETURN(',');
@@ -2349,7 +2351,7 @@ YY_RULE_SETUP
        YY_BREAK
 case 51:
 YY_RULE_SETUP
-#line 569 "toke.l"
+#line 571 "toke.l"
 {
                            LEXTRACE("= ");
                            LEXRETURN('=');
@@ -2357,7 +2359,7 @@ YY_RULE_SETUP
        YY_BREAK
 case 52:
 YY_RULE_SETUP
-#line 574 "toke.l"
+#line 576 "toke.l"
 {
                            LEXTRACE(": ");
                            LEXRETURN(':');
@@ -2365,7 +2367,7 @@ YY_RULE_SETUP
        YY_BREAK
 case 53:
 YY_RULE_SETUP
-#line 579 "toke.l"
+#line 581 "toke.l"
 {
                            if (yyleng & 1) {
                                LEXTRACE("!");
@@ -2375,7 +2377,7 @@ YY_RULE_SETUP
        YY_BREAK
 case 54:
 YY_RULE_SETUP
-#line 586 "toke.l"
+#line 588 "toke.l"
 {
                            if (YY_START == INSTR) {
                                LEXTRACE("ERROR ");
@@ -2390,14 +2392,14 @@ YY_RULE_SETUP
        YY_BREAK
 case 55:
 YY_RULE_SETUP
-#line 598 "toke.l"
+#line 600 "toke.l"
 {                      /* throw away space/tabs */
                            sawspace = TRUE;    /* but remember for fill_args */
                        }
        YY_BREAK
 case 56:
 YY_RULE_SETUP
-#line 602 "toke.l"
+#line 604 "toke.l"
 {
                            sawspace = TRUE;    /* remember for fill_args */
                            sudolineno++;
@@ -2406,7 +2408,7 @@ YY_RULE_SETUP
        YY_BREAK
 case 57:
 YY_RULE_SETUP
-#line 608 "toke.l"
+#line 610 "toke.l"
 {
                            BEGIN INITIAL;
                            sudolineno++;
@@ -2417,7 +2419,7 @@ YY_RULE_SETUP
        YY_BREAK
 case 58:
 YY_RULE_SETUP
-#line 616 "toke.l"
+#line 618 "toke.l"
 {
                            LEXTRACE("ERROR ");
                            LEXRETURN(ERROR);
@@ -2429,7 +2431,7 @@ case YY_STATE_EOF(GOTCMND):
 case YY_STATE_EOF(STARTDEFS):
 case YY_STATE_EOF(INDEFS):
 case YY_STATE_EOF(INSTR):
-#line 621 "toke.l"
+#line 623 "toke.l"
 {
                            if (YY_START != INITIAL) {
                                BEGIN INITIAL;
@@ -2442,10 +2444,10 @@ case YY_STATE_EOF(INSTR):
        YY_BREAK
 case 59:
 YY_RULE_SETUP
-#line 631 "toke.l"
+#line 633 "toke.l"
 ECHO;
        YY_BREAK
-#line 2448 "lex.yy.c"
+#line 2450 "lex.yy.c"
 
        case YY_END_OF_BUFFER:
                {
@@ -3336,7 +3338,7 @@ int main()
        return 0;
        }
 #endif
-#line 631 "toke.l"
+#line 633 "toke.l"
 
 struct path_list {
     char *path;
diff --git a/toke.l b/toke.l
index 2b151a0c6cce3901f7889169aa39e533a8fd0eca..e95fb18f7b867df459765dacc95969af21e99232 100644 (file)
--- a/toke.l
+++ b/toke.l
@@ -499,7 +499,9 @@ ALL {
                        }
 
 [[:upper:]][[:upper:][:digit:]_]* {
+#ifndef HAVE_SELINUX
                        got_alias:
+#endif
                            if (!fill(yytext, yyleng))
                                yyterminate();
                            LEXTRACE("ALIAS ");