Anonymous avatar Anonymous committed e89861c

Make the build spew warnings.

Comments (0)

Files changed (9)

+WARNS=	-W -Wall -Wstrict-prototypes -Wmissing-prototypes \
+	-Wpointer-arith	-Wno-uninitialized -Wreturn-type -Wcast-qual \
+	-Wwrite-strings -Wswitch -Wshadow -Wcast-align -Wchar-subscripts \
+	-Winline -Wnested-externs -Wredundant-decls
-CFLAGS+=-Wall -ansi
+ifdef ANSI
+  CFLAGS+= -ansi -pedantic
+  CFLAGS+= -std=c99 -D_POSIX_C_SOURCE=200112L
-	return("AST_UNKNOWN??!?");
+	return("AST_UNKNOWN?");


 struct symbol_table;
 struct builtin {
-	wchar_t *name;
+	const wchar_t *name;
 	struct value (*fn)(struct activation *);
 	struct type *(*ty)(void);
 	int arity;
 int maxlevel = 3;
-wchar_t *op[4][9] = {
+const wchar_t *op[4][9] = {
 	{ L"&", L"|",  L"",  L"",  L"",   L"",   L"",       L"",       L""       },
 	{ L"=", L"!=", L">", L"<", L">=", L"<=", L"\x2264", L"\x2265", L"\x2260" },
 	{ L"+", L"-",  L"",  L"",  L"",   L"",   L"",       L"",       L""       },
-report(int rtype, struct scan_st *sc, char *fmt, ...)
+report(int rtype, struct scan_st *sc, const char *fmt, ...)
 	va_list args;
 	int i;
 extern void	report_start(void);
 extern int	report_finish(void);
-extern void	report(int, struct scan_st *, char *, ...);
+extern void	report(int, struct scan_st *, const char *, ...);
 #endif /* !__SCAN_H_ */
 #include <assert.h>
 #include <stdio.h>
+#include <string.h>
 #include "mem.h"
 #include "type.h"
 struct value
-value_new_error(char *error)
+value_new_error(const char *error)
 	struct value v;
 struct value	value_new_string(wchar_t *);
 struct value	value_new_list(void);
-struct value	value_new_error(char *);
+struct value	value_new_error(const char *);
 struct value	value_new_builtin(struct builtin *);
 struct value	value_new_closure(struct ast *, struct activation *, int, int, int);
 struct value	value_new_dict(void);
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.