# HG changeset patch # User William Astle # Date 1342410159 21600 # Node ID 721a5ea5e36a7a5563cf39ca4830a4c93b22ae6f # Parent 7c2c2239ec9c0ee013fe90b7776399dcc0f32f56 Make warnings show up in assembly listings. Make warnings show up in assembly listings. They don't show up anywhere else currently. diff -r 7c2c2239ec9c -r 721a5ea5e36a lwasm/list.c --- a/lwasm/list.c Sun Jul 15 21:19:43 2012 -0600 +++ b/lwasm/list.c Sun Jul 15 21:42:39 2012 -0600 @@ -84,6 +84,14 @@ if (nl -> outputl > 0) obytelen += nl -> outputl; + if (nl -> warn) + { + lwasm_error_t *e; + for (e = nl -> warn; e; e = e -> next) + { + printf("Warning: %s\n", e -> mess); + } + } if (nc == 0) break; } @@ -103,6 +111,14 @@ } else { + if (cl -> warn) + { + lwasm_error_t *e; + for (e = cl -> warn; e; e = e -> next) + { + printf("Warning: %s\n", e -> mess); + } + } obytelen = cl -> outputl; if (obytelen > 0) { @@ -222,6 +238,6 @@ lw_free(obytes); obytes = NULL; } - if (as -> flags & FLAG_SYMBOLS) + if ((as -> flags & FLAG_SYMBOLS) && (as -> flags & FLAG_UNICORNS) == 0) list_symbols(as, of); }