Skip to content

Commit d28c2a8

Browse files
David Eklovfacebook-github-bot
authored andcommitted
Ignore return value of function declared with 'warn_unused_result' (pytorch#84369)
Summary: Pull Request resolved: pytorch#84369 X-link: meta-pytorch/multipy#152 Ignore return value of function declared with 'warn_unused_result' Addresses the following build failure that we get on some of our internal build environments: caffe2/torch/csrc/deploy/environment.h:60:5: error: ignoring return value of function declared with 'warn_unused_result' attribute [-Werror,-Wunused-result] system(rmCmd.c_str()); Test Plan: Successful build Reviewed By: jiyuanzFB, PaliC Differential Revision: D39181069 fbshipit-source-id: e571b09c6da9ca3dcac2b5eaf9f8a3f8473adefd
1 parent acb4a09 commit d28c2a8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

torch/csrc/deploy/environment.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ class Environment {
5757
}
5858
virtual ~Environment() {
5959
auto rmCmd = fmt::format("rm -rf {}", extraPythonLibrariesDir_);
60-
system(rmCmd.c_str());
60+
(void)system(rmCmd.c_str());
6161
}
6262
virtual void configureInterpreter(Interpreter* interp) = 0;
6363
virtual const std::vector<std::string>& getExtraPythonPaths() {

0 commit comments

Comments
 (0)