From 974f7ff046c81e178d10914d0d7a142cd1bd73c5 Mon Sep 17 00:00:00 2001 From: Kefu Chai Date: Fri, 22 Sep 2017 15:48:47 +0800 Subject: [PATCH] common/buffer: pass `const int[2]` to close_pipe() be explicit instead of passing a `const int*`, this avoids the warning from clang analyzer: Array subscript is undefined Signed-off-by: Kefu Chai --- src/common/buffer.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/common/buffer.cc b/src/common/buffer.cc index bb2132fe719f6..360d974535499 100644 --- a/src/common/buffer.cc +++ b/src/common/buffer.cc @@ -550,7 +550,7 @@ using namespace ceph; return 0; } - static void close_pipe(const int *fds) { + static void close_pipe(const int fds[2]) { if (fds[0] >= 0) VOID_TEMP_FAILURE_RETRY(::close(fds[0])); if (fds[1] >= 0) -- 2.39.5