diff options
author | Ruslan Ermilov <ru@nginx.com> | 2012-03-15 20:39:38 +0000 |
---|---|---|
committer | Ruslan Ermilov <ru@nginx.com> | 2012-03-15 20:39:38 +0000 |
commit | 4489fa8893518cc63ddcff221d12572f05ed7b1c (patch) | |
tree | ea629a2febbfe3095644871a5915dc0ac2de3c89 /auto/types | |
parent | 5d1d368cf4e027335672d07afe11585e999c1fd7 (diff) | |
download | nginx-4489fa8893518cc63ddcff221d12572f05ed7b1c.tar.gz |
Fixed compilation warnings in configuration C tests.
Based on a patch by Piotr Sikora.
Diffstat (limited to 'auto/types')
-rw-r--r-- | auto/types/sizeof | 3 | ||||
-rw-r--r-- | auto/types/typedef | 3 | ||||
-rw-r--r-- | auto/types/uintptr_t | 12 |
3 files changed, 12 insertions, 6 deletions
diff --git a/auto/types/sizeof b/auto/types/sizeof index e84a0905e..31411dde3 100644 --- a/auto/types/sizeof +++ b/auto/types/sizeof @@ -20,12 +20,13 @@ cat << END > $NGX_AUTOTEST.c #include <sys/time.h> $NGX_INCLUDE_UNISTD_H #include <signal.h> +#include <stdio.h> #include <sys/resource.h> $NGX_INCLUDE_INTTYPES_H $NGX_INCLUDE_AUTO_CONFIG_H int main() { - printf("%d", sizeof($ngx_type)); + printf("%zu", sizeof($ngx_type)); return 0; } diff --git a/auto/types/typedef b/auto/types/typedef index f121e8fc2..697190097 100644 --- a/auto/types/typedef +++ b/auto/types/typedef @@ -28,7 +28,8 @@ do $NGX_INCLUDE_INTTYPES_H int main() { - $ngx_try i = 0; + $ngx_try i; + i = 0; return 0; } diff --git a/auto/types/uintptr_t b/auto/types/uintptr_t index 07f7e7d7d..2a00b493c 100644 --- a/auto/types/uintptr_t +++ b/auto/types/uintptr_t @@ -4,8 +4,8 @@ echo $ngx_n "checking for uintptr_t ...$ngx_c" -echo >> $NGX_ERR -echo "checking for uintptr_t" >> $NGX_ERR +echo >> $NGX_AUTOCONF_ERR +echo "checking for uintptr_t" >> $NGX_AUTOCONF_ERR found=no @@ -15,13 +15,17 @@ cat << END > $NGX_AUTOTEST.c $NGX_INTTYPES_H int main() { - uintptr_t i = 0; + uintptr_t i; + i = 0; return 0; } END -eval "$CC -o $NGX_AUTOTEST $NGX_AUTOTEST.c >> $NGX_ERR 2>&1" +ngx_test="$CC $CC_TEST_FLAGS $CC_AUX_FLAGS \ + -o $NGX_AUTOTEST $NGX_AUTOTEST.c $NGX_LD_OPT" + +eval "$ngx_test >> $NGX_AUTOCONF_ERR 2>&1" if [ -x $NGX_AUTOTEST ]; then echo " uintptr_t found" |