Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1294759 > unrolled thread

[PATCH v15 03/25] tools subcmd: Add missing NORETURN define for parse-options.h

Started byJosh Poimboeuf <jpoimboe@redhat.com>
First post2015-12-18 13:50 +0100
Last post2015-12-18 13:50 +0100
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH v15 03/25] tools subcmd: Add missing NORETURN define for parse-options.h Josh Poimboeuf <jpoimboe@redhat.com> - 2015-12-18 13:50 +0100

#1294759 — [PATCH v15 03/25] tools subcmd: Add missing NORETURN define for parse-options.h

FromJosh Poimboeuf <jpoimboe@redhat.com>
Date2015-12-18 13:50 +0100
Subject[PATCH v15 03/25] tools subcmd: Add missing NORETURN define for parse-options.h
Message-ID<qH2DU-5IP-15@gated-at.bofh.it>
parse-options.h uses the NORETURN macro without defining it.  perf
doesn't see a build error because it defines the macro in util.h before
including parse-options.h.  But any other tool including it will see an
error.

Define the macro in parse-options.h (if not already defined) so that
other tools can include it.

Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com>
---
 tools/lib/subcmd/parse-options.h | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/tools/lib/subcmd/parse-options.h b/tools/lib/subcmd/parse-options.h
index 13a2cc1..d60cab2 100644
--- a/tools/lib/subcmd/parse-options.h
+++ b/tools/lib/subcmd/parse-options.h
@@ -4,6 +4,10 @@
 #include <stdbool.h>
 #include <stdint.h>
 
+#ifndef NORETURN
+#define NORETURN __attribute__((__noreturn__))
+#endif
+
 enum parse_opt_type {
 	/* special types */
 	OPTION_END,
-- 
2.4.3

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web