From: David Hotham Date: Sun, 14 Dec 2014 13:47:23 +0000 (+0000) Subject: Clean compile with CMAKE_BUILD_TYPE=RELEASE X-Git-Tag: upstream/7.0.6~45 X-Git-Url: http://review.tizen.org/git/?p=platform%2Fupstream%2Flibphonenumber.git;a=commitdiff_plain;h=e0a9138fa4673602fc95f2979cde514438860246 Clean compile with CMAKE_BUILD_TYPE=RELEASE --- diff --git a/cpp/src/phonenumbers/asyoutypeformatter.cc b/cpp/src/phonenumbers/asyoutypeformatter.cc index 0a5d958..07317aa 100644 --- a/cpp/src/phonenumbers/asyoutypeformatter.cc +++ b/cpp/src/phonenumbers/asyoutypeformatter.cc @@ -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; diff --git a/cpp/src/phonenumbers/base/logging.h b/cpp/src/phonenumbers/base/logging.h index 47c6cee..1463e6f 100644 --- a/cpp/src/phonenumbers/base/logging.h +++ b/cpp/src/phonenumbers/base/logging.h @@ -38,4 +38,8 @@ template T* CHECK_NOTNULL(T* ptr) { return ptr; } +#if !defined(IGNORE_UNUSED) +#define IGNORE_UNUSED(X) (void)(X) +#endif + #endif // I18N_PHONENUMBERS_BASE_LOGGING_H_ diff --git a/cpp/test/phonenumbers/geocoding/geocoding_test_program.cc b/cpp/test/phonenumbers/geocoding/geocoding_test_program.cc index 63b2b7a..4f999d0 100644 --- a/cpp/test/phonenumbers/geocoding/geocoding_test_program.cc +++ b/cpp/test/phonenumbers/geocoding/geocoding_test_program.cc @@ -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(