From fe20653a4e9e080da2e41f6e67909c98cd1b61bb Mon Sep 17 00:00:00 2001
From: Jim Warner <james.warner@comcast.net>
Date: Mon, 2 Jan 2012 01:26:45 -0600
Subject: [PATCH] ps: trade cumbersome GNU attributes with less wordy
 alternatives

---
 ps/common.h     | 2 +-
 ps/help.c       | 4 ++--
 ps/stacktrace.c | 6 ++++--
 3 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/ps/common.h b/ps/common.h
index 3c36528b..a79e1ff0 100644
--- a/ps/common.h
+++ b/ps/common.h
@@ -338,7 +338,7 @@ extern int want_this_proc(proc_t *buf);
 extern const char *select_bits_setup(void);
 
 /* help.c */
-extern void __attribute__ ((__noreturn__)) usage(FILE * out, int section);
+extern void usage(FILE * out, int section) NORETURN;
 
 /* global.c */
 extern void self_info(void);
diff --git a/ps/help.c b/ps/help.c
index dc68f19b..b0da7cb6 100644
--- a/ps/help.c
+++ b/ps/help.c
@@ -15,8 +15,8 @@
 
 #include "common.h"
 
-void __attribute__ ((__noreturn__)) usage(FILE * out, int section)
-{
+void usage(FILE * out, int section) NORETURN;
+void usage(FILE * out, int section){
 	fputs(USAGE_HEADER, out);
 	fprintf(out,
 	      _(" %s [options]\n"), program_invocation_short_name);
diff --git a/ps/stacktrace.c b/ps/stacktrace.c
index 60b89f44..f16a2f85 100644
--- a/ps/stacktrace.c
+++ b/ps/stacktrace.c
@@ -30,7 +30,8 @@ static void debug_stop(char **args){
 }
 
 /***********/
-static void stack_trace_sigchld(int signum __attribute__ ((__unused__))){
+static void stack_trace_sigchld(int signum){
+  (void)signum;
   stack_trace_done = 1;
 }
 
@@ -156,7 +157,8 @@ void debug(int method, char *prog_name){
 }
 
 /************/
-static void stack_trace_sigsegv(int signum __attribute__ ((__unused__))){
+static void stack_trace_sigsegv(int signum){
+  (void)signum;
   debug(STACK_TRACE, stored_prog_name);
 }