Enable Wextra and Wno-unused-parameters in default cflags R=viettrungluu@chromium.org Review URL: https://codereview.chromium.org/2088563002 .
diff --git a/build/config/compiler/BUILD.gn b/build/config/compiler/BUILD.gn index 5bbf619..cc2b7ac 100644 --- a/build/config/compiler/BUILD.gn +++ b/build/config/compiler/BUILD.gn
@@ -823,6 +823,8 @@ # code generated by flex (used in angle) contains that keyword. # http://crbug.com/255186 "-Wno-deprecated-register", + + "-Wno-unused-parameter", ] # NaCl's Clang compiler and Chrome's hermetic Clang compiler will almost @@ -845,12 +847,7 @@ config("chromium_code") { cflags = [ "-Wall", - - # GCC turns on -Wsign-compare for C++ under -Wall, but clang doesn't, - # so we specify it explicitly. - # TODO(fischman): remove this if http://llvm.org/PR10448 obsoletes it. - # http://code.google.com/p/chromium/issues/detail?id=90453 - "-Wsign-compare", + "-Wextra", ] # In Chromium code, we define __STDC_foo_MACROS in order to get the
diff --git a/services/prediction/dictionary_service.cc b/services/prediction/dictionary_service.cc index e9fbc86..7332b97 100644 --- a/services/prediction/dictionary_service.cc +++ b/services/prediction/dictionary_service.cc
@@ -44,7 +44,7 @@ dic_file.close(); } -latinime::Dictionary* const DictionaryService::OpenDictionary( +latinime::Dictionary* DictionaryService::OpenDictionary( const std::string path, const int start_offset, const int size,
diff --git a/services/prediction/dictionary_service.h b/services/prediction/dictionary_service.h index 7af1d56..e171cff 100644 --- a/services/prediction/dictionary_service.h +++ b/services/prediction/dictionary_service.h
@@ -31,10 +31,10 @@ private: void CreatDictFromEmbeddedDataIfNotExist(const std::string path); - latinime::Dictionary* const OpenDictionary(const std::string path, - const int start_offset, - const int size, - const bool is_updatable); + latinime::Dictionary* OpenDictionary(const std::string path, + const int start_offset, + const int size, + const bool is_updatable); latinime::PrevWordsInfo ProcessPrevWord( mojo::Array<PrevWordInfoPtr>& prev_words);