Fixed compilation warnings in configuration C tests.

Based on a patch by Piotr Sikora.
This commit is contained in:
Ruslan Ermilov
2012-03-15 20:39:38 +00:00
parent 5d1d368cf4
commit 4489fa8893
5 changed files with 19 additions and 12 deletions

View File

@@ -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;
}

View File

@@ -28,7 +28,8 @@ do
$NGX_INCLUDE_INTTYPES_H
int main() {
$ngx_try i = 0;
$ngx_try i;
i = 0;
return 0;
}

View File

@@ -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"