From: Igor Sysoev Date: Mon, 24 Oct 2016 14:16:10 +0000 (+0300) Subject: A build with -Werror=old-style-definition has been fixed. X-Git-Tag: 0.1.5~39 X-Git-Url: http://www.kaiwu.me/postgresql/commit/?a=commitdiff_plain;h=409d5b8a6346017a2fd4130fc3aea9e0b67110b3;p=njs.git A build with -Werror=old-style-definition has been fixed. Patch by Piotr Sikora. --- diff --git a/nxt/auto/clang b/nxt/auto/clang index e20efd03..a67a92a0 100644 --- a/nxt/auto/clang +++ b/nxt/auto/clang @@ -185,7 +185,7 @@ nxt_feature_name=NXT_HAVE_BUILTIN_UNREACHABLE 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_PREFETCH 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 --git a/nxt/auto/getrandom b/nxt/auto/getrandom index 9f94fbd7..d54110b1 100644 --- 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 --git a/nxt/auto/memalign b/nxt/auto/memalign index 82d34d37..8aa59d14 100644 --- 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 --git a/nxt/auto/pcre b/nxt/auto/pcre index ac9a6cc9..4e15d57c 100644 --- a/nxt/auto/pcre +++ b/nxt/auto/pcre @@ -20,7 +20,7 @@ if /bin/sh -c "(pcre-config --version)" >> $NXT_AUTOCONF_ERR 2>&1; then 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 --git a/nxt/auto/time b/nxt/auto/time index 5559a755..2ba4e005 100644 --- 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; }"