]> git.webhop.me Git - lcd4linux.git/commitdiff
some compiler warnings fixed
authormichael <michael@3ae390bd-cb1e-0410-b409-cd5a39f66f1f>
Wed, 2 May 2007 05:10:55 +0000 (05:10 +0000)
committermichael <michael@3ae390bd-cb1e-0410-b409-cd5a39f66f1f>
Wed, 2 May 2007 05:10:55 +0000 (05:10 +0000)
git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@797 3ae390bd-cb1e-0410-b409-cd5a39f66f1f

Makefile.am
Makefile.in
drv_Image.c
plugin_i2c_sensors.c
plugin_kvv.c
plugin_mpd.c

index 9ec7dedd8a84a51ab74730e9d026061cc8f3493d..8463dbd9c7ff28966d3bb5f38ae5032ea27526c5 100644 (file)
@@ -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@
index 2e2edf219370827410c2c747e64416fe3bd27247..4a084f727161577a567fa4e54bc4cc4f2a02cec9 100644 (file)
@@ -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@
index 05f25786f3605d85480999dd3ca24b5a7977e8c9..82521a7eb141138ac4cae16f5fb026f0022d3423 100644 (file)
@@ -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;
        }
     }
index 5d1c57feead5b5e414762a4dd66e44d5693521e6..14fcfa23b0e82f12079a544cfe06792f9d51d489 100644 (file)
@@ -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);
     }
index ec997e5ea9ab9addffec0e6c9c1178e876e86034..a1089c2d93474cb7f71a090464ebed05c70d870c 100644 (file)
@@ -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 */
index 63e22109d5d2bd806607c6f8cfb1abc3dc2312bf..8efd7de5b7fb58cac58381628e0c95d4dcac1ec4 100644 (file)
@@ -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);
 }