From fd293042febfc975ae394c339142716c5060af9a Mon Sep 17 00:00:00 2001 From: David Eklov Date: Wed, 7 Sep 2022 11:33:24 -0700 Subject: [PATCH] Ignore return value of function declared with 'warn_unused_result' (#84369) Summary: X-link: https://github.com/pytorch/pytorch/pull/84369 Pull Request resolved: https://github.com/pytorch/multipy/pull/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()); Reviewed By: jiyuanzFB, PaliC Differential Revision: D39181069 fbshipit-source-id: 953eb9e51fd15859bc435b04a1565924865a4b14 --- multipy/runtime/environment.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/multipy/runtime/environment.h b/multipy/runtime/environment.h index c082e4f3..3320616b 100644 --- a/multipy/runtime/environment.h +++ b/multipy/runtime/environment.h @@ -66,7 +66,7 @@ class Environment { } virtual ~Environment() { auto rmCmd = "rm -rf " + extraPythonLibrariesDir_; - system(rmCmd.c_str()); + (void)system(rmCmd.c_str()); } virtual void configureInterpreter(Interpreter* interp) = 0; virtual const std::vector& getExtraPythonPaths() {