ps: trade cumbersome GNU attributes with less wordy alternatives
This commit is contained in:
parent
fb11e1fe0a
commit
fe20653a4e
@ -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);
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user