From 2767972386235da569aff4168720eaae4b0b0b37 Mon Sep 17 00:00:00 2001 From: Cheng Chang Date: Thu, 16 Apr 2020 11:00:00 -0700 Subject: [PATCH] Fix warning when O_CLOEXEC is not defined (#6695) Summary: Compilation fails on systems that do not support O_CLOEXEC. Fix it. Pull Request resolved: https://github.com/facebook/rocksdb/pull/6695 Test Plan: compile without O_CLOEXEC support Reviewed By: anand1976 Differential Revision: D21011850 Pulled By: cheng-chang fbshipit-source-id: f1bf1cce2aa65c7d10b5a9613e941db30e928347 --- env/fs_posix.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/env/fs_posix.cc b/env/fs_posix.cc index 4601472a0..f64a67753 100644 --- a/env/fs_posix.cc +++ b/env/fs_posix.cc @@ -122,6 +122,8 @@ int cloexec_flags(int flags, const EnvOptions* options) { if (options == nullptr || options->set_fd_cloexec) { flags |= O_CLOEXEC; } +#else + (void)options; #endif return flags; }