Annotate unused variables

Signed-off-by: Thomas Graf <tgraf@suug.ch>
This commit is contained in:
Thomas Graf 2014-08-25 01:06:01 +02:00
parent e3d208905d
commit a36136ec4d
3 changed files with 4 additions and 2 deletions

View File

@ -60,9 +60,11 @@ enum {
#if defined __GNUC__ #if defined __GNUC__
#define __init __attribute__ ((constructor)) #define __init __attribute__ ((constructor))
#define __exit __attribute__ ((destructor)) #define __exit __attribute__ ((destructor))
#define __unused__ __attribute__ ((unused))
#else #else
#define __init #define __init
#define __exit #define __exit
#define __unused__
#endif #endif
#ifdef DEBUG #ifdef DEBUG

View File

@ -101,7 +101,7 @@ static void proc_read(void)
{ {
struct element *e; struct element *e;
FILE *fd; FILE *fd;
char buf[512], *p, *s, *unused; char buf[512], *p, *s, *unused __unused__;
int w; int w;
if (!(fd = fopen(c_path, "r"))) if (!(fd = fopen(c_path, "r")))

View File

@ -148,7 +148,7 @@ static void put_line(const char *fmt, ...)
{ {
va_list args; va_list args;
char buf[2048]; char buf[2048];
int x, y; int x, y __unused__;
memset(buf, 0, sizeof(buf)); memset(buf, 0, sizeof(buf));
getyx(stdscr, y, x); getyx(stdscr, y, x);