From: Adam C. Emerson Date: Tue, 5 Dec 2017 19:29:48 +0000 (-0500) Subject: rados: Add noreturn attribute to silence uninitialized warning X-Git-Tag: v13.0.2~839^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F19348%2Fhead;p=ceph.git 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 --- diff --git a/src/tools/rados/rados.cc b/src/tools/rados/rados.cc index 6e7a3a74ae3f..9c6baeb75dd0 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);