aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2008-09-25 21:24:58 +0200
committerMax Kellermann <max@duempel.org>2008-09-25 21:24:58 +0200
commit728309e4aeaac71555ce68ffcd3ff92952a270d3 (patch)
tree153958aba3285a32871dbb7138be222db3f8d334 /src
parentf825f27654988e107272c3a408ac5934f7731e34 (diff)
downloadmpd-728309e4aeaac71555ce68ffcd3ff92952a270d3.tar.gz
mpd-728309e4aeaac71555ce68ffcd3ff92952a270d3.tar.xz
mpd-728309e4aeaac71555ce68ffcd3ff92952a270d3.zip
fix miscellaneous sparse warnings
Static variables, pointers vs integers, void function returning, ...
Diffstat (limited to '')
-rw-r--r--src/main.c2
-rw-r--r--src/screen.c2
-rw-r--r--src/str_pool.c2
-rw-r--r--src/wreadln.c2
4 files changed, 5 insertions, 3 deletions
diff --git a/src/main.c b/src/main.c
index a33643d10..02b1680dc 100644
--- a/src/main.c
+++ b/src/main.c
@@ -454,4 +454,6 @@ main(int argc, const char *argv[])
exit_and_cleanup();
ncu_deinit();
+
+ return 0;
}
diff --git a/src/screen.c b/src/screen.c
index 9c7ca50a5..526f091dd 100644
--- a/src/screen.c
+++ b/src/screen.c
@@ -558,7 +558,7 @@ screen_update(mpdclient_t *c)
static int dbupdate = -1;
if( !screen.painted )
- return screen_paint(c);
+ screen_paint(c);
/* print a message if mpd status has changed */
if (c->status != NULL) {
diff --git a/src/str_pool.c b/src/str_pool.c
index 74839b59d..3313b3c50 100644
--- a/src/str_pool.c
+++ b/src/str_pool.c
@@ -31,7 +31,7 @@ struct slot {
char value[1];
} __attribute__((packed));
-struct slot *slots[NUM_SLOTS];
+static struct slot *slots[NUM_SLOTS];
static inline unsigned
calc_hash(const char *p)
diff --git a/src/wreadln.c b/src/wreadln.c
index dc1dfe867..cc703898b 100644
--- a/src/wreadln.c
+++ b/src/wreadln.c
@@ -334,7 +334,7 @@ _wreadln(WINDOW *w,
if (key >= 32) {
if (strlen (line + cursor)) { /* if the cursor is */
/* not at the last pos */
- gchar *tmp = 0;
+ gchar *tmp = NULL;
gsize size = strlen(line + cursor) + 1;
tmp = g_malloc0(size);