aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/core/util/command_line_flags.cc
diff options
context:
space:
mode:
Diffstat (limited to 'tensorflow/core/util/command_line_flags.cc')
-rw-r--r--tensorflow/core/util/command_line_flags.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/tensorflow/core/util/command_line_flags.cc b/tensorflow/core/util/command_line_flags.cc
index 55f1e30880..f1196fdfec 100644
--- a/tensorflow/core/util/command_line_flags.cc
+++ b/tensorflow/core/util/command_line_flags.cc
@@ -13,6 +13,7 @@ See the License for the specific language governing permissions and
limitations under the License.
==============================================================================*/
+#include <cinttypes>
#include <string>
#include <vector>
@@ -70,7 +71,7 @@ bool ParseInt64Flag(tensorflow::StringPiece arg, tensorflow::StringPiece flag,
str_util::ConsumePrefix(&arg, "=")) {
char extra;
int64_t parsed_int64;
- if (sscanf(arg.data(), "%ld%c", &parsed_int64, &extra) != 1) {
+ if (sscanf(arg.data(), "%" SCNd64 "%c", &parsed_int64, &extra) != 1) {
LOG(ERROR) << "Couldn't interpret value " << arg << " for flag " << flag
<< ".";
*value_parsing_ok = false;