Re: [PATCH] Configure: fix build with -Werror=old-style-definition
Hey Igor, > # HG changeset patch > # User Piotr Sikora > # Date 1477634184 25200 > # Thu Oct 27 22:56:24 2016 -0700 > # Node ID 8c0a1c8183a2811ebde2823144b5ea3bb25bec80 > # Parent d84e34c2dbde138ebd06b77bbe5b9ee2f1f62f05 > Configure: fix build with -Werror=old-style-definition. > > Signed-off-by: Piotr Sikora It looks that I've missed tests last time, sorry! Best regards, Piotr Sikora ___ nginx-devel mailing list nginx-devel@nginx.org http://mailman.nginx.org/mailman/listinfo/nginx-devel
[PATCH] Configure: fix build with -Werror=old-style-definition
# HG changeset patch # User Piotr Sikora # Date 1477634184 25200 # Thu Oct 27 22:56:24 2016 -0700 # Node ID 8c0a1c8183a2811ebde2823144b5ea3bb25bec80 # Parent d84e34c2dbde138ebd06b77bbe5b9ee2f1f62f05 Configure: fix build with -Werror=old-style-definition. Signed-off-by: Piotr Sikora diff -r d84e34c2dbde -r 8c0a1c8183a2 nxt/test/random_unit_test.c --- a/nxt/test/random_unit_test.c +++ b/nxt/test/random_unit_test.c @@ -14,7 +14,7 @@ static nxt_int_t -random_unit_test() +random_unit_test(void) { nxt_uint_tn; nxt_random_t r; ___ nginx-devel mailing list nginx-devel@nginx.org http://mailman.nginx.org/mailman/listinfo/nginx-devel
[PATCH] Configure: fix build with -Werror=old-style-definition
# HG changeset patch # User Piotr Sikora # Date 1476698419 25200 # Mon Oct 17 03:00:19 2016 -0700 # Node ID ec3df1ebada2b25409fcba4502f1267640f43a76 # Parent 8046b999aaaf95980e89a6d0620657bc4123342b Configure: fix build with -Werror=old-style-definition. Signed-off-by: Piotr Sikora diff -r 8046b999aaaf -r ec3df1ebada2 nxt/auto/clang --- a/nxt/auto/clang +++ b/nxt/auto/clang @@ -185,7 +185,7 @@ nxt_feature_name=NXT_HAVE_BUILTIN_UNREAC nxt_feature_run=no nxt_feature_incs= nxt_feature_libs= -nxt_feature_test="int main() { +nxt_feature_test="int main(void) { __builtin_unreachable(); }" . ${NXT_AUTO}feature @@ -196,7 +196,7 @@ nxt_feature_name=NXT_HAVE_BUILTIN_PREFET nxt_feature_run=no nxt_feature_incs= nxt_feature_libs= -nxt_feature_test="int main() { +nxt_feature_test="int main(void) { __builtin_prefetch(0); }" . ${NXT_AUTO}feature @@ -209,7 +209,7 @@ nxt_feature_path= nxt_feature_libs= nxt_feature_test="int n __attribute__ ((visibility(\"default\"))); - int main() { + int main(void) { return 1; }" . ${NXT_AUTO}feature @@ -228,7 +228,7 @@ nxt_feature_test="#include return malloc(1); } - int main() { + int main(void) { if (f() != NULL) { return 1; } @@ -255,7 +255,7 @@ else nxt_feature_libs= nxt_feature_test="int n __attribute__ ((aligned(64))); - int main() { + int main(void) { return 1; }" . ${NXT_AUTO}feature diff -r 8046b999aaaf -r ec3df1ebada2 nxt/auto/getrandom --- a/nxt/auto/getrandom +++ b/nxt/auto/getrandom @@ -14,7 +14,7 @@ nxt_feature_test="#include #include #include - int main() { + int main(void) { char buf[4]; (void) syscall(SYS_getrandom, buf, 4, 0); diff -r 8046b999aaaf -r ec3df1ebada2 nxt/auto/memalign --- a/nxt/auto/memalign +++ b/nxt/auto/memalign @@ -13,7 +13,7 @@ nxt_feature_incs= nxt_feature_libs= nxt_feature_test="#include - int main() { + int main(void) { void *p; if (posix_memalign(&p, 4096, 4096) != 0) @@ -34,7 +34,7 @@ if [ $nxt_found = no ]; then nxt_feature_libs= nxt_feature_test="#include - int main() { + int main(void) { if (memalign(4096, 4096) == NULL) return 1; return 0; diff -r 8046b999aaaf -r ec3df1ebada2 nxt/auto/pcre --- a/nxt/auto/pcre +++ b/nxt/auto/pcre @@ -20,7 +20,7 @@ if /bin/sh -c "(pcre-config --version)" nxt_feature_libs=$NXT_PCRE_LIB nxt_feature_test="#include - int main() { + int main(void) { pcre *re; re = pcre_compile(NULL, 0, NULL, 0, NULL); diff -r 8046b999aaaf -r ec3df1ebada2 nxt/auto/time --- a/nxt/auto/time +++ b/nxt/auto/time @@ -12,7 +12,7 @@ nxt_feature_incs= nxt_feature_libs= nxt_feature_test="#include - int main() { + int main(void) { time_t t; struct tm tm; @@ -32,7 +32,7 @@ nxt_feature_incs= nxt_feature_libs= nxt_feature_test="#include - int main() { + int main(void) { altzone = 0; return 0; }" ___ nginx-devel mailing list nginx-devel@nginx.org http://mailman.nginx.org/mailman/listinfo/nginx-devel
Re: [PATCH] Configure: fix build with -Werror=old-style-definition
Hello! On Mon, Jun 27, 2016 at 03:59:22PM -0700, Piotr Sikora wrote: > # HG changeset patch > # User Piotr Sikora > # Date 1467064805 25200 > # Mon Jun 27 15:00:05 2016 -0700 > # Node ID 3ba6126630ceec0767e70b88be1a004d82e2c27e > # Parent d452cb27639f714bc43b7f3ede417e3e7f8efdd6 > Configure: fix build with -Werror=old-style-definition. Committed, thanks. -- Maxim Dounin http://nginx.org/ ___ nginx-devel mailing list nginx-devel@nginx.org http://mailman.nginx.org/mailman/listinfo/nginx-devel
[PATCH] Configure: fix build with -Werror=old-style-definition
# HG changeset patch # User Piotr Sikora # Date 1467064805 25200 # Mon Jun 27 15:00:05 2016 -0700 # Node ID 3ba6126630ceec0767e70b88be1a004d82e2c27e # Parent d452cb27639f714bc43b7f3ede417e3e7f8efdd6 Configure: fix build with -Werror=old-style-definition. Signed-off-by: Piotr Sikora diff -r d452cb27639f -r 3ba6126630ce auto/cc/sunc --- a/auto/cc/sunc +++ b/auto/cc/sunc @@ -20,7 +20,10 @@ have=NGX_COMPILER value="\"Sun C $NGX_SU cat << END > $NGX_AUTOTEST.c -int main() { printf("%d", __SUNPRO_C); } +int main(void) { +printf("%d", __SUNPRO_C); +return 0; +} END diff -r d452cb27639f -r 3ba6126630ce auto/endianness --- a/auto/endianness +++ b/auto/endianness @@ -15,7 +15,7 @@ END cat << END > $NGX_AUTOTEST.c -int main() { +int main(void) { int i = 0x11223344; char *p; diff -r d452cb27639f -r 3ba6126630ce auto/feature --- a/auto/feature +++ b/auto/feature @@ -31,7 +31,7 @@ cat << END > $NGX_AUTOTEST.c $NGX_INCLUDE_UNISTD_H $ngx_feature_incs -int main() { +int main(void) { $ngx_feature_test; return 0; } diff -r d452cb27639f -r 3ba6126630ce auto/include --- a/auto/include +++ b/auto/include @@ -20,7 +20,7 @@ cat << END > $NGX_AUTOTEST.c $NGX_INCLUDE_SYS_PARAM_H #include <$ngx_include> -int main() { +int main(void) { return 0; } diff -r d452cb27639f -r 3ba6126630ce auto/types/sizeof --- a/auto/types/sizeof +++ b/auto/types/sizeof @@ -25,7 +25,7 @@ cat << END > $NGX_AUTOTEST.c $NGX_INCLUDE_INTTYPES_H $NGX_INCLUDE_AUTO_CONFIG_H -int main() { +int main(void) { printf("%d", (int) sizeof($ngx_type)); return 0; } diff -r d452cb27639f -r 3ba6126630ce auto/types/typedef --- a/auto/types/typedef +++ b/auto/types/typedef @@ -27,7 +27,7 @@ do #include $NGX_INCLUDE_INTTYPES_H -int main() { +int main(void) { $ngx_try i = 0; return (int) i; } diff -r d452cb27639f -r 3ba6126630ce auto/types/uintptr_t --- a/auto/types/uintptr_t +++ b/auto/types/uintptr_t @@ -19,7 +19,7 @@ cat << END > $NGX_AUTOTEST.c #include $NGX_INTTYPES_H -int main() { +int main(void) { uintptr_t i = 0; return (int) i; } ___ nginx-devel mailing list nginx-devel@nginx.org http://mailman.nginx.org/mailman/listinfo/nginx-devel