diff options
-rw-r--r-- | source4/heimdal/lib/asn1/asn1parse.c | 28 | ||||
-rw-r--r-- | source4/heimdal/lib/asn1/asn1parse.y | 28 | ||||
-rw-r--r-- | source4/heimdal/lib/asn1/gen_decode.c | 2 | ||||
-rw-r--r-- | source4/heimdal/lib/asn1/lex.c | 8 | ||||
-rw-r--r-- | source4/heimdal/lib/asn1/lex.h | 2 | ||||
-rw-r--r-- | source4/heimdal/lib/asn1/lex.l | 12 | ||||
-rw-r--r-- | source4/heimdal/lib/asn1/symbol.c | 2 | ||||
-rw-r--r-- | source4/heimdal/lib/com_err/lex.c | 4 | ||||
-rw-r--r-- | source4/heimdal/lib/com_err/lex.h | 2 | ||||
-rw-r--r-- | source4/heimdal/lib/com_err/lex.l | 4 | ||||
-rw-r--r-- | source4/heimdal/lib/com_err/parse.c | 2 | ||||
-rw-r--r-- | source4/heimdal/lib/com_err/parse.y | 2 |
12 files changed, 49 insertions, 47 deletions
diff --git a/source4/heimdal/lib/asn1/asn1parse.c b/source4/heimdal/lib/asn1/asn1parse.c index 7fa937a49d..4c2ae26d85 100644 --- a/source4/heimdal/lib/asn1/asn1parse.c +++ b/source4/heimdal/lib/asn1/asn1parse.c @@ -1794,21 +1794,21 @@ yyreduce: /* Line 1455 of yacc.c */ #line 244 "heimdal/lib/asn1/asn1parse.y" - { error_message("implicit tagging is not supported"); } + { lex_err_message("implicit tagging is not supported"); } break; case 5: /* Line 1455 of yacc.c */ #line 246 "heimdal/lib/asn1/asn1parse.y" - { error_message("automatic tagging is not supported"); } + { lex_err_message("automatic tagging is not supported"); } break; case 7: /* Line 1455 of yacc.c */ #line 251 "heimdal/lib/asn1/asn1parse.y" - { error_message("no extensibility options supported"); } + { lex_err_message("no extensibility options supported"); } break; case 17: @@ -1888,9 +1888,9 @@ yyreduce: #line 354 "heimdal/lib/asn1/asn1parse.y" { if((yyvsp[(2) - (5)].value)->type != integervalue) - error_message("Non-integer used in first part of range"); + lex_err_message("Non-integer used in first part of range"); if((yyvsp[(2) - (5)].value)->type != integervalue) - error_message("Non-integer in second part of range"); + lex_err_message("Non-integer in second part of range"); (yyval.range) = ecalloc(1, sizeof(*(yyval.range))); (yyval.range)->min = (yyvsp[(2) - (5)].value)->u.integervalue; (yyval.range)->max = (yyvsp[(4) - (5)].value)->u.integervalue; @@ -1903,7 +1903,7 @@ yyreduce: #line 364 "heimdal/lib/asn1/asn1parse.y" { if((yyvsp[(2) - (5)].value)->type != integervalue) - error_message("Non-integer in first part of range"); + lex_err_message("Non-integer in first part of range"); (yyval.range) = ecalloc(1, sizeof(*(yyval.range))); (yyval.range)->min = (yyvsp[(2) - (5)].value)->u.integervalue; (yyval.range)->max = (yyvsp[(2) - (5)].value)->u.integervalue - 1; @@ -1916,7 +1916,7 @@ yyreduce: #line 372 "heimdal/lib/asn1/asn1parse.y" { if((yyvsp[(4) - (5)].value)->type != integervalue) - error_message("Non-integer in second part of range"); + lex_err_message("Non-integer in second part of range"); (yyval.range) = ecalloc(1, sizeof(*(yyval.range))); (yyval.range)->min = (yyvsp[(4) - (5)].value)->u.integervalue + 2; (yyval.range)->max = (yyvsp[(4) - (5)].value)->u.integervalue; @@ -1929,7 +1929,7 @@ yyreduce: #line 380 "heimdal/lib/asn1/asn1parse.y" { if((yyvsp[(2) - (3)].value)->type != integervalue) - error_message("Non-integer used in limit"); + lex_err_message("Non-integer used in limit"); (yyval.range) = ecalloc(1, sizeof(*(yyval.range))); (yyval.range)->min = (yyvsp[(2) - (3)].value)->u.integervalue; (yyval.range)->max = (yyvsp[(2) - (3)].value)->u.integervalue; @@ -2177,7 +2177,7 @@ yyreduce: Symbol *s = addsym((yyvsp[(1) - (1)].name)); (yyval.type) = new_type(TType); if(s->stype != Stype && s->stype != SUndefined) - error_message ("%s is not a type\n", (yyvsp[(1) - (1)].name)); + lex_err_message ("%s is not a type\n", (yyvsp[(1) - (1)].name)); else (yyval.type)->symbol = s; } @@ -2247,7 +2247,7 @@ yyreduce: #line 607 "heimdal/lib/asn1/asn1parse.y" { if ((yyvsp[(3) - (3)].value)->type != objectidentifiervalue) - error_message("Non-OID used in ENCODED BY constraint"); + lex_err_message("Non-OID used in ENCODED BY constraint"); (yyval.constraint_spec) = new_constraint_spec(CT_CONTENTS); (yyval.constraint_spec)->u.content.type = NULL; (yyval.constraint_spec)->u.content.encoding = (yyvsp[(3) - (3)].value); @@ -2260,7 +2260,7 @@ yyreduce: #line 615 "heimdal/lib/asn1/asn1parse.y" { if ((yyvsp[(5) - (5)].value)->type != objectidentifiervalue) - error_message("Non-OID used in ENCODED BY constraint"); + lex_err_message("Non-OID used in ENCODED BY constraint"); (yyval.constraint_spec) = new_constraint_spec(CT_CONTENTS); (yyval.constraint_spec)->u.content.type = (yyvsp[(2) - (5)].type); (yyval.constraint_spec)->u.content.encoding = (yyvsp[(5) - (5)].value); @@ -2635,7 +2635,7 @@ yyreduce: Symbol *s = addsym((yyvsp[(1) - (1)].name)); if(s->stype != SValue || s->value->type != objectidentifiervalue) { - error_message("%s is not an object identifier\n", + lex_err_message("%s is not an object identifier\n", s->name); exit(1); } @@ -2659,7 +2659,7 @@ yyreduce: { Symbol *s = addsym((yyvsp[(1) - (1)].name)); if(s->stype != SValue) - error_message ("%s is not a value\n", + lex_err_message ("%s is not a value\n", s->name); else (yyval.value) = s->value; @@ -2950,7 +2950,7 @@ yyreturn: void yyerror (const char *s) { - error_message ("%s\n", s); + lex_err_message ("%s\n", s); } static Type * diff --git a/source4/heimdal/lib/asn1/asn1parse.y b/source4/heimdal/lib/asn1/asn1parse.y index 611c5b521a..9ff9ad7707 100644 --- a/source4/heimdal/lib/asn1/asn1parse.y +++ b/source4/heimdal/lib/asn1/asn1parse.y @@ -241,14 +241,14 @@ ModuleDefinition: IDENTIFIER objid_opt kw_DEFINITIONS TagDefault ExtensionDefaul TagDefault : kw_EXPLICIT kw_TAGS | kw_IMPLICIT kw_TAGS - { error_message("implicit tagging is not supported"); } + { lex_err_message("implicit tagging is not supported"); } | kw_AUTOMATIC kw_TAGS - { error_message("automatic tagging is not supported"); } + { lex_err_message("automatic tagging is not supported"); } | /* empty */ ; ExtensionDefault: kw_EXTENSIBILITY kw_IMPLIED - { error_message("no extensibility options supported"); } + { lex_err_message("no extensibility options supported"); } | /* empty */ ; @@ -353,9 +353,9 @@ BooleanType : kw_BOOLEAN range : '(' Value RANGE Value ')' { if($2->type != integervalue) - error_message("Non-integer used in first part of range"); + lex_err_message("Non-integer used in first part of range"); if($2->type != integervalue) - error_message("Non-integer in second part of range"); + lex_err_message("Non-integer in second part of range"); $$ = ecalloc(1, sizeof(*$$)); $$->min = $2->u.integervalue; $$->max = $4->u.integervalue; @@ -363,7 +363,7 @@ range : '(' Value RANGE Value ')' | '(' Value RANGE kw_MAX ')' { if($2->type != integervalue) - error_message("Non-integer in first part of range"); + lex_err_message("Non-integer in first part of range"); $$ = ecalloc(1, sizeof(*$$)); $$->min = $2->u.integervalue; $$->max = $2->u.integervalue - 1; @@ -371,7 +371,7 @@ range : '(' Value RANGE Value ')' | '(' kw_MIN RANGE Value ')' { if($4->type != integervalue) - error_message("Non-integer in second part of range"); + lex_err_message("Non-integer in second part of range"); $$ = ecalloc(1, sizeof(*$$)); $$->min = $4->u.integervalue + 2; $$->max = $4->u.integervalue; @@ -379,7 +379,7 @@ range : '(' Value RANGE Value ')' | '(' Value ')' { if($2->type != integervalue) - error_message("Non-integer used in limit"); + lex_err_message("Non-integer used in limit"); $$ = ecalloc(1, sizeof(*$$)); $$->min = $2->u.integervalue; $$->max = $2->u.integervalue; @@ -550,7 +550,7 @@ DefinedType : IDENTIFIER Symbol *s = addsym($1); $$ = new_type(TType); if(s->stype != Stype && s->stype != SUndefined) - error_message ("%s is not a type\n", $1); + lex_err_message ("%s is not a type\n", $1); else $$->symbol = s; } @@ -606,7 +606,7 @@ ContentsConstraint: kw_CONTAINING Type | kw_ENCODED kw_BY Value { if ($3->type != objectidentifiervalue) - error_message("Non-OID used in ENCODED BY constraint"); + lex_err_message("Non-OID used in ENCODED BY constraint"); $$ = new_constraint_spec(CT_CONTENTS); $$->u.content.type = NULL; $$->u.content.encoding = $3; @@ -614,7 +614,7 @@ ContentsConstraint: kw_CONTAINING Type | kw_CONTAINING Type kw_ENCODED kw_BY Value { if ($5->type != objectidentifiervalue) - error_message("Non-OID used in ENCODED BY constraint"); + lex_err_message("Non-OID used in ENCODED BY constraint"); $$ = new_constraint_spec(CT_CONTENTS); $$->u.content.type = $2; $$->u.content.encoding = $5; @@ -851,7 +851,7 @@ objid_element : IDENTIFIER '(' NUMBER ')' Symbol *s = addsym($1); if(s->stype != SValue || s->value->type != objectidentifiervalue) { - error_message("%s is not an object identifier\n", + lex_err_message("%s is not an object identifier\n", s->name); exit(1); } @@ -884,7 +884,7 @@ Valuereference : IDENTIFIER { Symbol *s = addsym($1); if(s->stype != SValue) - error_message ("%s is not a value\n", + lex_err_message ("%s is not a value\n", s->name); else $$ = s->value; @@ -942,7 +942,7 @@ ObjectIdentifierValue: objid void yyerror (const char *s) { - error_message ("%s\n", s); + lex_err_message ("%s\n", s); } static Type * diff --git a/source4/heimdal/lib/asn1/gen_decode.c b/source4/heimdal/lib/asn1/gen_decode.c index ad76c07251..5a24339c42 100644 --- a/source4/heimdal/lib/asn1/gen_decode.c +++ b/source4/heimdal/lib/asn1/gen_decode.c @@ -143,7 +143,7 @@ find_tag (const Type *t, case TType: if ((t->symbol->stype == Stype && t->symbol->type == NULL) || t->symbol->stype == SUndefined) { - error_message("%s is imported or still undefined, " + lex_err_message("%s is imported or still undefined, " " can't generate tag checking data in CHOICE " "without this information", t->symbol->name); diff --git a/source4/heimdal/lib/asn1/lex.c b/source4/heimdal/lib/asn1/lex.c index 612d336168..fd19f23f8d 100644 --- a/source4/heimdal/lib/asn1/lex.c +++ b/source4/heimdal/lib/asn1/lex.c @@ -1657,7 +1657,7 @@ YY_RULE_SETUP yylval.constant = strtol((const char *)yytext, &e, 0); if(e == y) - error_message("malformed constant (%s)", yytext); + lex_err_message("malformed constant (%s)", yytext); else return NUMBER; } @@ -1694,7 +1694,7 @@ YY_RULE_SETUP case 94: YY_RULE_SETUP #line 273 "lex.l" -{ error_message("Ignoring char(%c)\n", *yytext); } +{ lex_err_message("Ignoring char(%c)\n", *yytext); } YY_BREAK case 95: YY_RULE_SETUP @@ -2712,7 +2712,7 @@ yywrap () #endif void -error_message (const char *format, ...) +lex_err_message (const char *format, ...) { va_list args; @@ -2726,6 +2726,6 @@ error_message (const char *format, ...) static void unterminated(const char *type, unsigned start_lineno) { - error_message("unterminated %s, possibly started on line %d\n", type, start_lineno); + lex_err_message("unterminated %s, possibly started on line %d\n", type, start_lineno); } diff --git a/source4/heimdal/lib/asn1/lex.h b/source4/heimdal/lib/asn1/lex.h index abca8f723d..f203c98f1f 100644 --- a/source4/heimdal/lib/asn1/lex.h +++ b/source4/heimdal/lib/asn1/lex.h @@ -35,7 +35,7 @@ #include <roken.h> -void error_message (const char *, ...) +void lex_err_message (const char *, ...) __attribute__ ((format (printf, 1, 2))); extern int error_flag; diff --git a/source4/heimdal/lib/asn1/lex.l b/source4/heimdal/lib/asn1/lex.l index 7bd442bc50..d5be97538f 100644 --- a/source4/heimdal/lib/asn1/lex.l +++ b/source4/heimdal/lib/asn1/lex.l @@ -50,6 +50,8 @@ #include "lex.h" #include "gen_locl.h" +static void lex_err_message (const char *format, ...); + static unsigned lineno = 1; #undef ECHO @@ -258,7 +260,7 @@ WITH { return kw_WITH; } yylval.constant = strtol((const char *)yytext, &e, 0); if(e == y) - error_message("malformed constant (%s)", yytext); + lex_err_message("malformed constant (%s)", yytext); else return NUMBER; } @@ -270,7 +272,7 @@ WITH { return kw_WITH; } \n { ++lineno; } \.\.\. { return ELLIPSIS; } \.\. { return RANGE; } -. { error_message("Ignoring char(%c)\n", *yytext); } +. { lex_err_message("Ignoring char(%c)\n", *yytext); } %% #ifndef yywrap /* XXX */ @@ -281,8 +283,8 @@ yywrap () } #endif -void -error_message (const char *format, ...) +static void +lex_err_message (const char *format, ...) { va_list args; @@ -296,5 +298,5 @@ error_message (const char *format, ...) static void unterminated(const char *type, unsigned start_lineno) { - error_message("unterminated %s, possibly started on line %d\n", type, start_lineno); + lex_err_message("unterminated %s, possibly started on line %d\n", type, start_lineno); } diff --git a/source4/heimdal/lib/asn1/symbol.c b/source4/heimdal/lib/asn1/symbol.c index e65876a032..93d2cd4594 100644 --- a/source4/heimdal/lib/asn1/symbol.c +++ b/source4/heimdal/lib/asn1/symbol.c @@ -93,7 +93,7 @@ checkfunc(void *ptr, void *arg) { Symbol *s = ptr; if (s->stype == SUndefined) { - error_message("%s is still undefined\n", s->name); + lex_err_message("%s is still undefined\n", s->name); *(int *) arg = 1; } return 0; diff --git a/source4/heimdal/lib/com_err/lex.c b/source4/heimdal/lib/com_err/lex.c index 9afc27a6be..3b17cd7035 100644 --- a/source4/heimdal/lib/com_err/lex.c +++ b/source4/heimdal/lib/com_err/lex.c @@ -1899,7 +1899,7 @@ getstring(void) continue; } if(c == '\n'){ - error_message("unterminated string"); + lex_err_message("unterminated string"); lineno++; break; } @@ -1919,7 +1919,7 @@ getstring(void) } void -error_message (const char *format, ...) +lex_err_message (const char *format, ...) { va_list args; diff --git a/source4/heimdal/lib/com_err/lex.h b/source4/heimdal/lib/com_err/lex.h index 76f3e2b2a5..abfec922f0 100644 --- a/source4/heimdal/lib/com_err/lex.h +++ b/source4/heimdal/lib/com_err/lex.h @@ -33,7 +33,7 @@ /* $Id$ */ -void error_message (const char *, ...) +void lex_err_message (const char *, ...) __attribute__ ((format (printf, 1, 2))); int yylex(void); diff --git a/source4/heimdal/lib/com_err/lex.l b/source4/heimdal/lib/com_err/lex.l index b68814b21c..f099c1e1bd 100644 --- a/source4/heimdal/lib/com_err/lex.l +++ b/source4/heimdal/lib/com_err/lex.l @@ -94,7 +94,7 @@ getstring(void) continue; } if(c == '\n'){ - error_message("unterminated string"); + lex_err_message("unterminated string"); lineno++; break; } @@ -114,7 +114,7 @@ getstring(void) } void -error_message (const char *format, ...) +lex_err_message (const char *format, ...) { va_list args; diff --git a/source4/heimdal/lib/com_err/parse.c b/source4/heimdal/lib/com_err/parse.c index 4e087e4a95..73a2c1c35c 100644 --- a/source4/heimdal/lib/com_err/parse.c +++ b/source4/heimdal/lib/com_err/parse.c @@ -1736,6 +1736,6 @@ name2number(const char *str) void yyerror (char *s) { - error_message ("%s\n", s); + lex_err_message ("%s\n", s); } diff --git a/source4/heimdal/lib/com_err/parse.y b/source4/heimdal/lib/com_err/parse.y index d64681d902..f1ae64d97e 100644 --- a/source4/heimdal/lib/com_err/parse.y +++ b/source4/heimdal/lib/com_err/parse.y @@ -167,5 +167,5 @@ name2number(const char *str) void yyerror (char *s) { - error_message ("%s\n", s); + lex_err_message ("%s\n", s); } |