aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/core/lib/strings/numbers.cc
diff options
context:
space:
mode:
Diffstat (limited to 'tensorflow/core/lib/strings/numbers.cc')
-rw-r--r--tensorflow/core/lib/strings/numbers.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/tensorflow/core/lib/strings/numbers.cc b/tensorflow/core/lib/strings/numbers.cc
index 87aa5915ff..fff6f1fedc 100644
--- a/tensorflow/core/lib/strings/numbers.cc
+++ b/tensorflow/core/lib/strings/numbers.cc
@@ -19,6 +19,7 @@ limitations under the License.
#include <stdio.h>
#include <stdlib.h>
#include <algorithm>
+#include <cinttypes>
#include <cmath>
#include <locale>
#include <unordered_map>
@@ -391,7 +392,7 @@ string FpToString(Fprint fp) {
bool StringToFp(const string& s, Fprint* fp) {
char junk;
uint64_t result;
- if (sscanf(s.c_str(), "%lx%c", &result, &junk) == 1) {
+ if (sscanf(s.c_str(), "%" SCNx64 "%c", &result, &junk) == 1) {
*fp = result;
return true;
} else {