Browse Source

fix build error with clang and gcc " (#2742)

This very minor, trivial and risk free commit fix introduced in 8.12.45 with #2734
error: ignoring return value of function declared with 'warn_unused_result' attribute [-Werror,-Wunused-result]"
Without this fix, I cannot build using clang++13
pull/2743/head
Gilles Vollant 4 years ago
committed by GitHub
parent
commit
8453b4219c
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions
  1. +2
    -1
      cpp/src/phonenumbers/stringutil.cc

+ 2
- 1
cpp/src/phonenumbers/stringutil.cc View File

@ -88,7 +88,8 @@ bool HasSuffixString(const string& s, const string& suffix) {
template <typename T>
void GenericAtoi(const string& s, T* out) {
absl::SimpleAtoi(s, out);
if (!absl::SimpleAtoi(s, out))
*out = 0;
}
void safe_strto32(const string& s, int32 *n) {


Loading…
Cancel
Save