Search
lxdream.org :: lxdream/src/tools/gendec.c :: diff
lxdream 0.9.1
released Jun 29
Download Now
filename src/tools/gendec.c
changeset 1298:d0eb2307b847
prev1296:30ecee61f811
author nkeynes
date Wed Feb 04 08:38:23 2015 +1000 (5 years ago)
permissions -rw-r--r--
last change Fix assorted compile warnings reported by Clang
file annotate diff log raw
1.1 --- a/src/tools/gendec.c Sat Jan 26 14:00:48 2013 +1000
1.2 +++ b/src/tools/gendec.c Wed Feb 04 08:38:23 2015 +1000
1.3 @@ -176,7 +176,7 @@
1.4 static void fprint_action( struct rule *rule, const struct action *action, int depth, FILE *f )
1.5 {
1.6 int i;
1.7 - if( action == NULL ) {
1.8 + if( action == NULL || action->text == NULL ) {
1.9 fprintf( f, "%*cUNIMP(ir); /* %s */\n", depth*8, ' ', rule->format );
1.10 } else {
1.11 fprintf( f, "%*c{ /* %s */", depth*8, ' ', rule->format );
1.12 @@ -292,7 +292,9 @@
1.13 if( emit_warnings ) {
1.14 check_actions( rules, token );
1.15 }
1.16 + fprintf( out, "#pragma clang diagnostic push\n#pragma clang diagnostic ignored \"-Wunused-variable\"\n" );
1.17 split_and_generate( rules, token->actions, ruleidx, rules->rule_count, 0, 1, out );
1.18 + fprintf( out, "#pragma clang diagnostic pop\n" );
1.19 }
1.20 token = action_file_next(af);
1.21 }
.