Enable -Wall -Werror and fix 2 compile-errors it would introduce.
Change-Id: I9150969787f308152d49c82d31078df50deabdcd
BUG=chromium-os:13800
TEST=emerge-x86-mario speech_synthesis and emerge-arm-generic speech_synthesis both compile cleanly
Review URL: http://codereview.chromium.org/6812006
diff --git a/Makefile b/Makefile
index 7b5034b..3e72c85 100644
--- a/Makefile
+++ b/Makefile
@@ -7,6 +7,7 @@
LDFLAGS = -lpthread -lm -lasound -lpico -lresample -lchromeos -lrt -lbase
CCFLAGS = $(CFLAGS) \
+ -Wall -Werror \
-I. \
-I/build/x86_generic/usr/include \
-L/build/x86_generic/usr/lib
diff --git a/earcon_manager.cc b/earcon_manager.cc
index 3ad1cfd..23b61ae 100644
--- a/earcon_manager.cc
+++ b/earcon_manager.cc
@@ -207,6 +207,7 @@
if (frames && channels && rate) {
return LoadEarcon(frames, audio_data.get(), channels, rate, loop);
}
+ return -1;
}
void EarconManager::Play(int earcon_id) {
diff --git a/speech_synthesizer_service.cc b/speech_synthesizer_service.cc
index 3271fcd..9ff7197 100644
--- a/speech_synthesizer_service.cc
+++ b/speech_synthesizer_service.cc
@@ -122,7 +122,7 @@
}
string token = "";
while(1) {
- int sep = props.find(";");
+ unsigned int sep = props.find(";");
if (sep == string::npos) {
token = props;
} else {