Welcome! Log In Create A New Profile

Advanced

[nginx] svn commit: r4560 - in trunk/auto: . lib/pcre os types

Anonymous User
March 27, 2012 12:46PM
Author: mdounin
Date: 2012-03-27 16:44:52 +0000 (Tue, 27 Mar 2012)
New Revision: 4560
URL: http://trac.nginx.org/nginx/changeset/4560/nginx

Log:
Fixed more gcc46 warnings in configure tests.

Steps to reproduce:

../configure --with-cc="gcc46" --with-cc-opt="-Wall -Werror -O2"


Modified:
trunk/auto/lib/pcre/conf
trunk/auto/os/solaris
trunk/auto/types/typedef
trunk/auto/types/uintptr_t
trunk/auto/unix

Modified: trunk/auto/lib/pcre/conf
===================================================================
--- trunk/auto/lib/pcre/conf 2012-03-27 16:42:34 UTC (rev 4559)
+++ trunk/auto/lib/pcre/conf 2012-03-27 16:44:52 UTC (rev 4560)
@@ -98,7 +98,9 @@
ngx_feature_incs="#include <pcre.h>"
ngx_feature_path=
ngx_feature_libs="-lpcre"
- ngx_feature_test="pcre *re; re = pcre_compile(NULL, 0, NULL, 0, NULL)"
+ ngx_feature_test="pcre *re;
+ re = pcre_compile(NULL, 0, NULL, 0, NULL);
+ if (re == NULL) return 1"
. auto/feature

if [ $ngx_found = no ]; then

Modified: trunk/auto/os/solaris
===================================================================
--- trunk/auto/os/solaris 2012-03-27 16:42:34 UTC (rev 4559)
+++ trunk/auto/os/solaris 2012-03-27 16:44:52 UTC (rev 4560)
@@ -35,7 +35,8 @@
ngx_feature_libs="-lsendfile"
ngx_feature_test="int fd = 1; sendfilevec_t vec[1];
size_t sent; ssize_t n;
- n = sendfilev(fd, vec, 1, &sent)"
+ n = sendfilev(fd, vec, 1, &sent);
+ if (n == -1) return 1"
. auto/feature



Modified: trunk/auto/types/typedef
===================================================================
--- trunk/auto/types/typedef 2012-03-27 16:42:34 UTC (rev 4559)
+++ trunk/auto/types/typedef 2012-03-27 16:44:52 UTC (rev 4560)
@@ -28,9 +28,8 @@
$NGX_INCLUDE_INTTYPES_H

int main() {
- $ngx_try i;
- i = 0;
- return 0;
+ $ngx_try i = 0;
+ return (int) i;
}

END

Modified: trunk/auto/types/uintptr_t
===================================================================
--- trunk/auto/types/uintptr_t 2012-03-27 16:42:34 UTC (rev 4559)
+++ trunk/auto/types/uintptr_t 2012-03-27 16:44:52 UTC (rev 4560)
@@ -15,9 +15,8 @@
$NGX_INTTYPES_H

int main() {
- uintptr_t i;
- i = 0;
- return 0;
+ uintptr_t i = 0;
+ return (int) i;
}

END

Modified: trunk/auto/unix
===================================================================
--- trunk/auto/unix 2012-03-27 16:42:34 UTC (rev 4559)
+++ trunk/auto/unix 2012-03-27 16:44:52 UTC (rev 4560)
@@ -33,12 +33,12 @@
ngx_feature_incs="#include <poll.h>"
ngx_feature_path=
ngx_feature_libs=
-ngx_feature_test="int n, dp; struct pollfd pl;
- dp = 0;
+ngx_feature_test="int n; struct pollfd pl;
pl.fd = 0;
pl.events = 0;
pl.revents = 0;
- n = poll(&pl, 1, 0)"
+ n = poll(&pl, 1, 0);
+ if (n == -1) return 1"
. auto/feature

if [ $ngx_found = no ]; then
@@ -57,7 +57,8 @@
dvp.dp_fds = NULL;
dvp.dp_nfds = 0;
dvp.dp_timeout = 0;
- n = ioctl(dp, DP_POLL, &dvp)"
+ n = ioctl(dp, DP_POLL, &dvp);
+ if (n == -1) return 1"
. auto/feature

if [ $ngx_found = yes ]; then
@@ -357,7 +358,7 @@
ti.tcpi_rttvar = 0;
ti.tcpi_snd_cwnd = 0;
ti.tcpi_rcv_space = 0;
- getsockopt(0, IPPROTO_TCP, TCP_INFO, NULL, &optlen)"
+ getsockopt(0, IPPROTO_TCP, TCP_INFO, &ti, &optlen)"
. auto/feature


@@ -512,7 +513,8 @@
ngx_feature_incs=
ngx_feature_path=
ngx_feature_libs=
-ngx_feature_test="char buf[1]; ssize_t n; n = pread(0, buf, 1, 0)"
+ngx_feature_test="char buf[1]; ssize_t n; n = pread(0, buf, 1, 0);
+ if (n == -1) return 1"
. auto/feature


@@ -522,7 +524,8 @@
ngx_feature_incs=
ngx_feature_path=
ngx_feature_libs=
-ngx_feature_test="char buf[1]; ssize_t n; n = pwrite(1, buf, 1, 0)"
+ngx_feature_test="char buf[1]; ssize_t n; n = pwrite(1, buf, 1, 0);
+ if (n == -1) return 1"
. auto/feature


@@ -596,7 +599,8 @@
ngx_feature_incs="#include <stdlib.h>"
ngx_feature_path=
ngx_feature_libs=
-ngx_feature_test="void *p; int n; n = posix_memalign(&p, 4096, 4096)"
+ngx_feature_test="void *p; int n; n = posix_memalign(&p, 4096, 4096);
+ if (n != 0) return 1"
. auto/feature


@@ -607,7 +611,8 @@
#include <malloc.h>"
ngx_feature_path=
ngx_feature_libs=
-ngx_feature_test="void *p; p = memalign(4096, 4096)"
+ngx_feature_test="void *p; p = memalign(4096, 4096);
+ if (p == NULL) return 1"
. auto/feature


@@ -694,10 +699,12 @@
ngx_feature="struct msghdr.msg_control"
ngx_feature_name="NGX_HAVE_MSGHDR_MSG_CONTROL"
ngx_feature_run=no
-ngx_feature_incs="#include <sys/socket.h>"
+ngx_feature_incs="#include <sys/socket.h>
+ #include <stdio.h>"
ngx_feature_path=
ngx_feature_libs=
-ngx_feature_test="struct msghdr msg; msg.msg_control = NULL"
+ngx_feature_test="struct msghdr msg; msg.msg_control = NULL;
+ printf(\"%d\", (int) msg.msg_control)"
. auto/feature


@@ -705,40 +712,47 @@
ngx_feature_name="NGX_HAVE_FIONBIO"
ngx_feature_run=no
ngx_feature_incs="#include <sys/ioctl.h>
+ #include <stdio.h>
$NGX_INCLUDE_SYS_FILIO_H"
ngx_feature_path=
ngx_feature_libs=
-ngx_feature_test="int i; i = FIONBIO"
+ngx_feature_test="int i = FIONBIO; printf(\"%d\", i)"
. auto/feature


ngx_feature="struct tm.tm_gmtoff"
ngx_feature_name="NGX_HAVE_GMTOFF"
ngx_feature_run=no
-ngx_feature_incs="#include <time.h>"
+ngx_feature_incs="#include <time.h>
+ #include <stdio.h>"
ngx_feature_path=
ngx_feature_libs=
-ngx_feature_test="struct tm tm; tm.tm_gmtoff = 0"
+ngx_feature_test="struct tm tm; tm.tm_gmtoff = 0;
+ printf(\"%d\", (int) tm.tm_gmtoff)"
. auto/feature


ngx_feature="struct dirent.d_namlen"
ngx_feature_name="NGX_HAVE_D_NAMLEN"
ngx_feature_run=no
-ngx_feature_incs="#include <dirent.h>"
+ngx_feature_incs="#include <dirent.h>
+ #include <stdio.h>"
ngx_feature_path=
ngx_feature_libs=
-ngx_feature_test="struct dirent dir; dir.d_namlen = 0"
+ngx_feature_test="struct dirent dir; dir.d_namlen = 0;
+ printf(\"%d\", (int) dir.d_namlen)"
. auto/feature


ngx_feature="struct dirent.d_type"
ngx_feature_name="NGX_HAVE_D_TYPE"
ngx_feature_run=no
-ngx_feature_incs="#include <dirent.h>"
+ngx_feature_incs="#include <dirent.h>
+ #include <stdio.h>"
ngx_feature_path=
ngx_feature_libs=
-ngx_feature_test="struct dirent dir; dir.d_type = DT_REG"
+ngx_feature_test="struct dirent dir; dir.d_type = DT_REG;
+ printf(\"%d\", (int) dir.d_type)"
. auto/feature



_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

[nginx] svn commit: r4560 - in trunk/auto: . lib/pcre os types

Anonymous User 1038 March 27, 2012 12:46PM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 323
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready