Turn compiler warnings into errors.

Gobi code still has lots of other compiler warnings if we turn on -Wall
and -Wextra. For now, we turn on -Werror to catch the default warnings
like -Wreturn-type.

BUG=chromium:690629
TEST=Build and run unit tests.

Change-Id: I2e5660e95e58442e779bfcea2bce0545752897a4
Reviewed-on: https://chromium-review.googlesource.com/440373
Commit-Ready: Ben Chan <benchan@chromium.org>
Tested-by: Ben Chan <benchan@chromium.org>
Reviewed-by: Mike Frysinger <vapier@chromium.org>
diff --git a/Makefile b/Makefile
index 4e1e7c1..0f8b49a 100644
--- a/Makefile
+++ b/Makefile
@@ -4,7 +4,10 @@
 
 ROOT := $(DESTDIR)/opt/Qualcomm
 PREFIX := $(DESTDIR)
-CXXFLAGS += -fPIC
+CXXFLAGS += -fPIC -Werror
+# TODO(benchan): Gobi code has lots of other warnings, which should be cleaned
+# up eventually.
+CXXFLAGS += -Wno-switch
 
 sdk :
 	$(MAKE) -C GobiConnectionMgmt