aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormichael <michael@3ae390bd-cb1e-0410-b409-cd5a39f66f1f>2007-05-02 05:10:55 +0000
committermichael <michael@3ae390bd-cb1e-0410-b409-cd5a39f66f1f>2007-05-02 05:10:55 +0000
commitc909270be37026e4877acf556af0556f7d1356c6 (patch)
tree592e4337206471fd99b03f00d0d456187e210096
parentb8b8a6a2cf8726a86bc2ba58fc502ce5a4ac2b1d (diff)
downloadlcd4linux-c909270be37026e4877acf556af0556f7d1356c6.tar.gz
some compiler warnings fixed
git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@797 3ae390bd-cb1e-0410-b409-cd5a39f66f1f
-rw-r--r--Makefile.am2
-rw-r--r--Makefile.in2
-rw-r--r--drv_Image.c4
-rw-r--r--plugin_i2c_sensors.c2
-rw-r--r--plugin_kvv.c2
-rw-r--r--plugin_mpd.c10
6 files changed, 14 insertions, 8 deletions
diff --git a/Makefile.am b/Makefile.am
index 9ec7ded..8463dbd 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -14,7 +14,7 @@ bin_PROGRAMS = lcd4linux
AM_CFLAGS = -D_GNU_SOURCE -Wall -W -fno-strict-aliasing
# use this for lots of warnings
-#AM_CFLAGS = -D_GNU_SOURCE -std=c90 -Wall -W -pedantic -Wno-variadic-macros -fno-strict-aliasing
+#AM_CFLAGS = -D_GNU_SOURCE -std=c99 -m64 -Wall -W -pedantic -Wno-variadic-macros -fno-strict-aliasing
lcd4linux_LDFLAGS =
lcd4linux_LDADD = @DRIVERS@ @PLUGINS@ @DRVLIBS@ @PLUGINLIBS@
diff --git a/Makefile.in b/Makefile.in
index 2e2edf2..4a084f7 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -211,7 +211,7 @@ CLEANFILES = *~
AM_CFLAGS = -D_GNU_SOURCE -Wall -W -fno-strict-aliasing
# use this for lots of warnings
-#AM_CFLAGS = -D_GNU_SOURCE -std=c90 -Wall -W -pedantic -Wno-variadic-macros -fno-strict-aliasing
+#AM_CFLAGS = -D_GNU_SOURCE -std=c99 -m64 -Wall -W -pedantic -Wno-variadic-macros -fno-strict-aliasing
lcd4linux_LDFLAGS =
lcd4linux_LDADD = @DRIVERS@ @PLUGINS@ @DRVLIBS@ @PLUGINLIBS@
lcd4linux_DEPENDENCIES = @DRIVERS@ @PLUGINS@
diff --git a/drv_Image.c b/drv_Image.c
index 05f2578..82521a7 100644
--- a/drv_Image.c
+++ b/drv_Image.c
@@ -114,14 +114,14 @@ static int drv_IMG_flush_PPM(void)
if (bitbuf == NULL) {
if ((bitbuf = malloc(xsize * ysize * sizeof(*bitbuf))) == NULL) {
- error("%s: malloc(%d) failed: %s", Name, (int) xsize * ysize * sizeof(*bitbuf), strerror(errno));
+ error("%s: malloc() failed: %s", Name, strerror(errno));
return -1;
}
}
if (rowbuf == NULL) {
if ((rowbuf = malloc(3 * xsize * sizeof(*rowbuf))) == NULL) {
- error("Raster: malloc(%d) failed: %s", (int) 3 * xsize * sizeof(*rowbuf), strerror(errno));
+ error("Raster: malloc() failed: %s", strerror(errno));
return -1;
}
}
diff --git a/plugin_i2c_sensors.c b/plugin_i2c_sensors.c
index 5d1c57f..14fcfa2 100644
--- a/plugin_i2c_sensors.c
+++ b/plugin_i2c_sensors.c
@@ -296,7 +296,7 @@ static int configure_i2c_sensors(void)
path_cfg = realloc(path_cfg, strlen(path_cfg) + 2);
strcat(path_cfg, "/");
}
- debug("using i2c sensors at %s (from %s)", path, cfg_source());
+ debug("using i2c sensors at %s (from %s)", path_cfg, cfg_source());
path = realloc(path, strlen(path_cfg) + 1);
strcpy(path, path_cfg);
}
diff --git a/plugin_kvv.c b/plugin_kvv.c
index ec997e5..a1089c2 100644
--- a/plugin_kvv.c
+++ b/plugin_kvv.c
@@ -413,7 +413,7 @@ static void kvv_client( __attribute__ ((unused))
info("[KVV] empty/no reply");
if (count > 0) {
- char *input, *cookie, *name, *value;
+ char *input, *cookie, *name = NULL, *value = NULL;
int input_len, cookie_len, name_len, value_len;
/* buffer to html encode value */
diff --git a/plugin_mpd.c b/plugin_mpd.c
index 63e2210..8efd7de 100644
--- a/plugin_mpd.c
+++ b/plugin_mpd.c
@@ -64,7 +64,12 @@ static struct Pointer connect()
char *port = "6600";
int iport;
char *test;
- struct Pointer mpd;
+
+ struct Pointer mpd = {
+ .conn = NULL,
+ .status = NULL,
+ .entity = NULL
+ };
if ((test = getenv("MPD_HOST"))) {
host = test;
@@ -228,7 +233,8 @@ static void album(RESULT * result)
#define _mpd_player_get_repeat 004
#define _mpd_player_get_random 005
-void error_callback(MpdObj * mi, int errorid, char *msg, void *userdata)
+void error_callback( __attribute__ ((unused)) MpdObj * mi, int errorid, char *msg, __attribute__ ((unused))
+ void *userdata)
{
printf("Error %i: '%s'\n", errorid, msg);
}