* Scan for __attribute__((...)) in general (the earliest was 2.5,

where we had 'noreturn' etc. but no '__noreturn__')
* Scan for __attribute__((bounded)) and __attribute__((used))
  if we have __attribute__((noreturn))
* To be able to scan if certain attributes give warnings,
  scan for -Werror with a simple programme which hopefully triggers none
* Convert __attribute__((unused)) to __unused, noreturn -> __dead
* Unify other attributes
* Clean up typography a little more
This commit is contained in:
tg
2007-01-12 01:49:29 +00:00
parent 70eb6d19c2
commit 5891915f1b
10 changed files with 161 additions and 148 deletions

10
funcs.c
View File

@ -5,7 +5,7 @@
#include "sh.h"
__RCSID("$MirOS: src/bin/mksh/funcs.c,v 1.41 2007/01/12 00:25:39 tg Exp $");
__RCSID("$MirOS: src/bin/mksh/funcs.c,v 1.42 2007/01/12 01:49:28 tg Exp $");
int
c_cd(char **wp)
@ -2042,7 +2042,7 @@ p_time(struct shf *shf, int posix, struct timeval *tv, int width,
}
int
c_times(char **wp __attribute__((unused)))
c_times(char **wp __unused)
{
struct rusage usage;
@ -2172,7 +2172,7 @@ timex_hook(struct op *t, char **volatile *app)
/* exec with no args - args case is taken care of in comexec() */
int
c_exec(char **wp __attribute__((unused)))
c_exec(char **wp __unused)
{
int i;
@ -2278,7 +2278,7 @@ c_mknod(char **wp)
/* dummy function, special case in comexec() */
int
c_builtin(char **wp __attribute__((unused)))
c_builtin(char **wp __unused)
{
return 0;
}
@ -2803,7 +2803,7 @@ ptest_isa(Test_env *te, Test_meta meta)
}
static const char *
ptest_getopnd(Test_env *te, Test_op op, int do_eval __attribute__((unused)))
ptest_getopnd(Test_env *te, Test_op op, int do_eval __unused)
{
if (te->pos.wp >= te->wp_end)
return op == TO_FILTT ? "1" : NULL;