X-Git-Url: https://ruderich.org/simon/gitweb/?a=blobdiff_plain;ds=sidebyside;f=tests%2Fexample_error.c;h=0ed8746b26ff3138e9938826cdc6e24369777304;hb=a63fef43c2d1e9c111f3da0fc3f8deb7f1b3024d;hp=04eca8dcff611dea9a565ec4bfb384a6d4a626f2;hpb=7f9856c5dace35f8efe5a20ee1013815e67b9550;p=coloredstderr%2Fcoloredstderr.git
diff --git a/tests/example_error.c b/tests/example_error.c
index 04eca8d..0ed8746 100644
--- a/tests/example_error.c
+++ b/tests/example_error.c
@@ -17,21 +17,26 @@
* along with this program. If not, see .
*/
+#include
+
#define _GNU_SOURCE /* for program_invocation_name */
#include
#include
#include
#include
+#include "../src/compiler.h"
+
+
void (*error_print_progname)(void);
-static void print_prognmae(void) {
+static void print_progname(void) {
fprintf(stderr, "PROG");
}
-int main(int argc, char **argv) {
+int main(int argc unused, char **argv unused) {
program_invocation_name = "./example_error";
error(0, 0, "");
@@ -41,7 +46,7 @@ int main(int argc, char **argv) {
error_at_line(0, ENOMEM, "file", 42, "");
error_at_line(0, ENOMEM, "file", 42, "");
- error_print_progname = print_prognmae;
+ error_print_progname = print_progname;
error_one_per_line = 1;
error(0, 0, "");