From 74471397cfebdffaec739417283d4a97924a6dcd Mon Sep 17 00:00:00 2001 From: xjqbest <173596896@qq.com> Date: Tue, 16 Apr 2019 11:42:39 +0800 Subject: [PATCH] fix bug of num > INT_MAX --- paddle/fluid/framework/data_feed.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/paddle/fluid/framework/data_feed.cc b/paddle/fluid/framework/data_feed.cc index 365c80da34..ec1d9ba845 100644 --- a/paddle/fluid/framework/data_feed.cc +++ b/paddle/fluid/framework/data_feed.cc @@ -546,7 +546,7 @@ bool MultiSlotDataFeed::CheckFile(const char* filename) { VLOG(0) << "please check line<" << instance_cout << "> in file<" << filename << ">"; return false; - } else if (errno == ERANGE || num > INT_MAX) { + } else if (errno == ERANGE || (unsigned int)num > INT_MAX) { VLOG(0) << "error: the number of ids greater than INT_MAX"; VLOG(0) << "please check line<" << instance_cout << "> in file<" << filename << ">"; -- GitLab