Clean compile with CMAKE_BUILD_TYPE=RELEASE
authorDavid Hotham <david.hotham@metaswitch.com>
Sun, 14 Dec 2014 13:47:23 +0000 (13:47 +0000)
committerYoungjae Shin <yj99.shin@samsung.com>
Tue, 9 Jun 2015 11:43:24 +0000 (20:43 +0900)
cpp/src/phonenumbers/asyoutypeformatter.cc
cpp/src/phonenumbers/base/logging.h
cpp/test/phonenumbers/geocoding/geocoding_test_program.cc

index 0a5d958..07317aa 100644 (file)
@@ -114,6 +114,7 @@ void MatchAllGroups(const string& pattern,
   bool status =
       cache->GetRegExp(new_pattern).Consume(consume_input.get(), group);
   DCHECK(status);
+  IGNORE_UNUSED(status);
 }
 
 PhoneMetadata CreateEmptyMetadata() {
@@ -510,6 +511,7 @@ void AsYouTypeFormatter::AttemptToFormatAccruedDigits(
       bool status = regexp_cache_.GetRegExp(pattern).GlobalReplace(
           &formatted_number, number_format.format());
       DCHECK(status);
+      IGNORE_UNUSED(status);
 
       AppendNationalNumber(formatted_number, formatted_result);
       return;
index 47c6cee..1463e6f 100644 (file)
@@ -38,4 +38,8 @@ template <typename T> T* CHECK_NOTNULL(T* ptr) {
   return ptr;
 }
 
+#if !defined(IGNORE_UNUSED)
+#define IGNORE_UNUSED(X) (void)(X)
+#endif 
+
 #endif  // I18N_PHONENUMBERS_BASE_LOGGING_H_
index 63b2b7a..4f999d0 100644 (file)
@@ -33,6 +33,7 @@ int main() {
   const PhoneNumberUtil::ErrorType status = phone_util.Parse(
       "16502530000", "US", &number);
   CHECK_EQ(status, PhoneNumberUtil::NO_PARSING_ERROR);
+  IGNORE_UNUSED(status);
 
   const std::string description =
       PhoneNumberOfflineGeocoder().GetDescriptionForNumber(