mirror of
https://github.com/nginx/nginx.git
synced 2025-02-25 18:55:26 -06:00
Fixed compilation warnings in configuration C tests.
Based on a patch by Piotr Sikora.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -28,7 +28,8 @@ do
|
||||
$NGX_INCLUDE_INTTYPES_H
|
||||
|
||||
int main() {
|
||||
$ngx_try i = 0;
|
||||
$ngx_try i;
|
||||
i = 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user