From e5c24fa1c8b5cd51f878a3ccfd014241f87cc958 Mon Sep 17 00:00:00 2001 From: "Adam C. Emerson" Date: Tue, 5 Dec 2017 14:29:48 -0500 Subject: [PATCH] rados: Add noreturn attribute to silence uninitialized warning Marking the `usage_exit` function as noreturn lets the compiler know that execution won't continue beyond the statement where it's called, so the path that would lead to the variables being used uninitialized doesn't count. Signed-off-by: Adam C. Emerson --- src/tools/rados/rados.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tools/rados/rados.cc b/src/tools/rados/rados.cc index 6e7a3a74ae3..9c6baeb75dd 100644 --- a/src/tools/rados/rados.cc +++ b/src/tools/rados/rados.cc @@ -235,7 +235,7 @@ void usage(ostream& out) unsigned default_op_size = 1 << 22; -static void usage_exit() +[[noreturn]] static void usage_exit() { usage(cerr); exit(1); -- 2.39.5