From: Adam C. Emerson Date: Thu, 30 Aug 2018 15:27:06 +0000 (-0400) Subject: test: Quell unused variable warnings X-Git-Tag: v14.0.1~303^2~5 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=d1aa821f2f5364c580a00ae36e225f5ef7825875;p=ceph.git test: Quell unused variable warnings Signed-off-by: Adam C. Emerson --- diff --git a/src/test/fs/test_trim_caps.cc b/src/test/fs/test_trim_caps.cc index a7fd8149238d3..42ba357a019ad 100644 --- a/src/test/fs/test_trim_caps.cc +++ b/src/test/fs/test_trim_caps.cc @@ -16,8 +16,8 @@ int main(int argc, char *argv[]) { char buf; int pipefd[2]; - int rc = pipe(pipefd); - assert(rc >= 0); + int rc [[maybe_unused]] = pipe(pipefd); + assert(rc >= 0); pid_t pid = fork(); assert(pid >= 0); @@ -31,7 +31,7 @@ int main(int argc, char *argv[]) ceph_create(&cmount, "admin"); ceph_conf_read_file(cmount, NULL); - int ret = ceph_mount(cmount, NULL); + int ret [[maybe_unused]] = ceph_mount(cmount, NULL); assert(ret >= 0); if (pid == 0) { @@ -53,7 +53,7 @@ int main(int argc, char *argv[]) struct ceph_statx stx; ret = ceph_statx(cmount, "1", &stx, 0, 0); assert(ret >= 0); - uint64_t orig_ino = stx.stx_ino; + uint64_t orig_ino [[maybe_unused]] = stx.stx_ino; ret = ceph_mkdir(cmount, "2", 0755);