]> code.bitgloo.com Git - bitgloo/alee-forth.git/commitdiff
enable warnings
authorClyne Sullivan <clyne@bitgloo.com>
Thu, 23 Feb 2023 23:31:40 +0000 (18:31 -0500)
committerClyne Sullivan <clyne@bitgloo.com>
Thu, 23 Feb 2023 23:31:40 +0000 (18:31 -0500)
Makefile
dictionary.cpp

index 560defa7ee758425f67155ab25051c5cae4a3e54..4307ca03fe576bf049862ed77d7017e6198aa804 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,4 +1,5 @@
-CXXFLAGS += -std=c++17 -g3 -ggdb -O0
+CXXFLAGS += -std=c++17 -g3 -ggdb -O0 \
+            -Wall -Wextra -pedantic -Wno-vla -Werror
 
 CXXFILES := corewords.cpp dictionary.cpp parser.cpp state.cpp types.cpp
 OBJFILES := $(subst .cpp,.o,$(CXXFILES))
index de103034e2301ee3d8ee97ea091fae3f1cde9289..1ac28396305a3d405f399f0b6482bf5141de7d70 100644 (file)
@@ -115,7 +115,7 @@ Word Dictionary::input()
 
 bool Dictionary::equal(Word word, std::string_view sv) const
 {
-    if (sv.size() != word.end - word.start)
+    if (sv.size() != static_cast<Addr>(word.end - word.start))
         return false;
 
     for (unsigned i = 0; i < sv.size(); ++i) {