Patchwork [13/17] configure: Fix compiler warnings in config.log (uninitialized variable)

login
register
mail settings
Submitter Stefan Hajnoczi
Date Dec. 19, 2011, 11:12 a.m.
Message ID <1324293158-25433-14-git-send-email-stefanha@linux.vnet.ibm.com>
Download mbox | patch
Permalink /patch/132198/
State New
Headers show

Comments

Stefan Hajnoczi - Dec. 19, 2011, 11:12 a.m.
From: Stefan Weil <sw@weilnetz.de>

warning: ‘fd’ is used uninitialized in this function
warning: ‘id’ is used uninitialized in this function

Signed-off-by: Stefan Weil <sw@weilnetz.de>
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
---
 configure |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

Patch

diff --git a/configure b/configure
index eeec8fa..e3713af 100755
--- a/configure
+++ b/configure
@@ -2237,7 +2237,7 @@  cat > $TMPC << EOF
 
 int main(void)
 {
-    int len, fd;
+    int len, fd = 0;
     len = tee(STDIN_FILENO, STDOUT_FILENO, INT_MAX, SPLICE_F_NONBLOCK);
     splice(STDIN_FILENO, NULL, fd, NULL, len, SPLICE_F_MOVE);
     return 0;
@@ -2449,7 +2449,7 @@  fi
 cat > $TMPC <<EOF
 #include <signal.h>
 #include <time.h>
-int main(void) { clockid_t id; return clock_gettime(id, NULL); }
+int main(void) { return clock_gettime(CLOCK_REALTIME, NULL); }
 EOF
 
 if compile_prog "" "" ; then