summaryrefslogtreecommitdiff
path: root/scope.c
diff options
context:
space:
mode:
authorTom Harley2019-10-30 14:38:00 +0000
committerTom Harley2019-10-30 14:38:00 +0000
commit935600fb9612ef569f1f68f60b0b7cdd57ce7af6 (patch)
treeae1f15d7f1a72ed494be43f9796c1d4da0fd848a /scope.c
parentBox everything (diff)
downloadsinter-935600fb9612ef569f1f68f60b0b7cdd57ce7af6.tar.gz
sinter-935600fb9612ef569f1f68f60b0b7cdd57ce7af6.zip

Enable -Weverything

Clang has a -Weverything option, that enables all compile-time warnings and elevates them all to errors. This option is now passed to the compiler, and all warnings/errors the code produced have been addressed.

Using -Weverything locks the project into using clang as its compiler: this should not be a problem since clang is probably being used to compile the LLVM output of the project anyway. If support for other compilers is required, it should be simple enough to replace -Weverything with an equivalent collection of portable flags.

Explicit Makefile rules for compiling the C files produced by flex/bison are now included in the project since these C files absolutely do not pass -Weverything checks.

Diffstat (limited to 'scope.c')
-rw-r--r--scope.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/scope.c b/scope.c
index 7936f55..87ef76e 100644
--- a/scope.c
+++ b/scope.c
@@ -3,6 +3,7 @@
#include "scope.h"
#include "error.h"
+#include "debug.h"
/*
* Guess we'll use a linked list of linked lists for now, though that certainly
@@ -11,6 +12,8 @@
* TODO
*/
+void free_layer(scope_layer *layer);
+
void free_layer(scope_layer *layer) {
for (scope_entry *entry = layer->head; entry;) {
scope_entry *x = entry;