Welcome! Log In Create A New Profile

Advanced

[PATCH] Configure: fix build with -Werror=old-style-definition

Piotr Sikora
June 27, 2016 07:02PM
# HG changeset patch
# User Piotr Sikora <piotrsikora@google.com>
# 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 <piotrsikora@google.com>

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 <netinet/in.h>
$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 <sys/types.h>
$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
Subject Author Views Posted

[PATCH] Configure: fix build with -Werror=old-style-definition

Piotr Sikora 469 June 27, 2016 07:02PM

Re: [PATCH] Configure: fix build with -Werror=old-style-definition

Maxim Dounin 183 July 07, 2016 10:00AM

Re: [PATCH] Configure: fix build with -Werror=old-style-definition

Piotr Sikora 166 October 28, 2016 02:04AM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 312
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready