From: Kefu Chai Date: Fri, 22 Sep 2017 07:48:47 +0000 (+0800) Subject: common/buffer: pass `const int[2]` to close_pipe() X-Git-Tag: v13.0.1~434^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=974f7ff046c81e178d10914d0d7a142cd1bd73c5;p=ceph.git 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 --- diff --git a/src/common/buffer.cc b/src/common/buffer.cc index bb2132fe719..360d9745354 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)