From 2b955c013943f88a18b6eb0cb6004fc6f8203b9c Mon Sep 17 00:00:00 2001 From: David Eklov Date: Wed, 7 Sep 2022 11:37:12 -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: 103ebd9529ac5d947f18a22e3fc6294341d246a4 --- 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() {