Skip to content

Commit

Permalink
Ignore return value of function declared with 'warn_unused_result' (p…
Browse files Browse the repository at this point in the history
…ytorch#84369)

Summary:
Pull Request resolved: pytorch#84369

X-link: 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
  • Loading branch information
David Eklov authored and facebook-github-bot committed Sep 7, 2022
1 parent acb4a09 commit d28c2a8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion torch/csrc/deploy/environment.h
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ class Environment {
}
virtual ~Environment() {
auto rmCmd = fmt::format("rm -rf {}", extraPythonLibrariesDir_);
system(rmCmd.c_str());
(void)system(rmCmd.c_str());
}
virtual void configureInterpreter(Interpreter* interp) = 0;
virtual const std::vector<std::string>& getExtraPythonPaths() {
Expand Down

0 comments on commit d28c2a8

Please sign in to comment.