summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Graf <tgraf@suug.ch>2014-08-25 01:06:01 +0200
committerThomas Graf <tgraf@suug.ch>2014-08-25 01:07:19 +0200
commita36136ec4d9056a32a9547c3abcc22ee7e1b3c32 (patch)
tree21a73b78eda724b0cd48337003594a4262118ce7
parente3d208905d62253a402f7cb32f96f910e64d8c4f (diff)
Annotate unused variables
Signed-off-by: Thomas Graf <tgraf@suug.ch>
-rw-r--r--include/bmon/bmon.h2
-rw-r--r--src/in_proc.c2
-rw-r--r--src/out_curses.c2
3 files changed, 4 insertions, 2 deletions
diff --git a/include/bmon/bmon.h b/include/bmon/bmon.h
index e349110..05934ec 100644
--- a/include/bmon/bmon.h
+++ b/include/bmon/bmon.h
@@ -60,9 +60,11 @@ enum {
#if defined __GNUC__
#define __init __attribute__ ((constructor))
#define __exit __attribute__ ((destructor))
+#define __unused__ __attribute__ ((unused))
#else
#define __init
#define __exit
+#define __unused__
#endif
#ifdef DEBUG
diff --git a/src/in_proc.c b/src/in_proc.c
index aead5ce..b14269b 100644
--- a/src/in_proc.c
+++ b/src/in_proc.c
@@ -101,7 +101,7 @@ static void proc_read(void)
{
struct element *e;
FILE *fd;
- char buf[512], *p, *s, *unused;
+ char buf[512], *p, *s, *unused __unused__;
int w;
if (!(fd = fopen(c_path, "r")))
diff --git a/src/out_curses.c b/src/out_curses.c
index cbd19ae..c973789 100644
--- a/src/out_curses.c
+++ b/src/out_curses.c
@@ -148,7 +148,7 @@ static void put_line(const char *fmt, ...)
{
va_list args;
char buf[2048];
- int x, y;
+ int x, y __unused__;
memset(buf, 0, sizeof(buf));
getyx(stdscr, y, x);