diff --git a/paddle/fluid/framework/device_worker.h b/paddle/fluid/framework/device_worker.h index 8e211fcb9d8e002ac9eacfc105e5c90401d293c1..2a6c2fa5b386aff3c63fc9c23b40271587f6c946 100644 --- a/paddle/fluid/framework/device_worker.h +++ b/paddle/fluid/framework/device_worker.h @@ -32,7 +32,7 @@ limitations under the License. */ #include "paddle/fluid/framework/variable_helper.h" #include "paddle/fluid/operators/reader/blocking_queue.h" #include "paddle/fluid/platform/place.h" -#includw "paddle/fluid/platform/port.h" +#include "paddle/fluid/platform/port.h" #include "paddle/fluid/platform/timer.h" namespace paddle { diff --git a/paddle/fluid/framework/io/shell.cc b/paddle/fluid/framework/io/shell.cc index a404988bf687d382903c617d5782c91e33f18e74..bcfa4f44ff1c6561cbbd60b76f75de1c8461a88a 100644 --- a/paddle/fluid/framework/io/shell.cc +++ b/paddle/fluid/framework/io/shell.cc @@ -242,7 +242,7 @@ static int shell_p2open_fork_internal(const char* real_cmd, int pipein_fds[2], std::pair, std::shared_ptr> shell_p2open( const std::string& cmd) { #if defined _WIN32 || defined __APPLE__ - return nullptr; + return {}; #else if (shell_verbose()) { LOG(INFO) << "Opening bidirectional pipe[" << cmd << "]"; @@ -315,7 +315,9 @@ std::string shell_get_command_output(const std::string& cmd) { } } } while (err_no == -1); + return ""; #endif } + } // end namespace framework } // end namespace paddle diff --git a/paddle/fluid/framework/io/shell.h b/paddle/fluid/framework/io/shell.h index 22f24adcfd4d170e3622dc166e66791a2f10e5b7..7f0da490f877df75741c83660f6fd0ae90736fd3 100644 --- a/paddle/fluid/framework/io/shell.h +++ b/paddle/fluid/framework/io/shell.h @@ -29,6 +29,7 @@ #include #include #include "glog/logging.h" +#include "paddle/fluid/platform/port.h" #include "paddle/fluid/string/string_helper.h" namespace paddle { diff --git a/paddle/fluid/framework/trainer.h b/paddle/fluid/framework/trainer.h index b2cf79531c44e203d540d6bbdb80f092a41f5ce2..b29736cfbbebc183d969dcf1863a6a1d097d2358 100644 --- a/paddle/fluid/framework/trainer.h +++ b/paddle/fluid/framework/trainer.h @@ -25,12 +25,12 @@ limitations under the License. */ #include "paddle/fluid/framework/data_set.h" #include "paddle/fluid/framework/device_worker.h" #include "paddle/fluid/framework/lod_tensor.h" -#includw "paddle/fluid/platform/port.h" #include "paddle/fluid/framework/program_desc.h" #include "paddle/fluid/framework/reader.h" #include "paddle/fluid/framework/trainer_desc.pb.h" #include "paddle/fluid/framework/variable_helper.h" #include "paddle/fluid/operators/reader/blocking_queue.h" +#include "paddle/fluid/platform/port.h" namespace paddle { namespace framework {