Patchwork [09/17] configure: Fix compiler warning in config.log (integer from pointer)

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

Comments

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

warning: return makes integer from pointer without a cast

v2: Removed type cast.

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

Patch

diff --git a/configure b/configure
index 93c6cbe..773df6a 100755
--- a/configure
+++ b/configure
@@ -1841,7 +1841,11 @@  if test "$curses" != "no" ; then
 #ifdef __OpenBSD__
 #define resize_term resizeterm
 #endif
-int main(void) { resize_term(0, 0); return curses_version(); }
+int main(void) {
+  const char *s = curses_version();
+  resize_term(0, 0);
+  return s != 0;
+}
 EOF
   for curses_lib in $curses_list; do
     if compile_prog "" "$curses_lib" ; then