8000 Merge pull request #5059 from juliantaylor/config-warn · numpy/numpy@fe0f6cc · GitHub
[go: up one dir, main page]

Skip to content

Commit fe0f6cc

Browse files
committed
Merge pull request #5059 from juliantaylor/config-warn
MAINT: make main a strict prototype in configure checks
2 parents 2c6937f + c0bba1c commit fe0f6cc

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

numpy/distutils/command/config.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ def check_decl(self, symbol,
173173
headers=None, include_dirs=None):
174174
self._check_compiler()
175175
body = """
176-
int main()
176+
int main(void)
177177
{
178178
#ifndef %s
179179
(void) %s;
@@ -188,7 +188,7 @@ def check_macro_true(self, symbol,
188188
headers=None, include_dirs=None):
189189
self._check_compiler()
190190
body = """
191-
int main()
191+
int main(void)
192192
{
193193
#if %s
194194
#else
@@ -208,7 +208,7 @@ def check_type(self, type_name, headers=None, include_dirs=None,
208208

209209
# First check the type can be compiled
210210
body = r"""
211-
int main() {
211+
int main(void) {
212212
if ((%(name)s *) 0)
213213
return 0;
214214
if (sizeof (%(name)s))
@@ -236,7 +236,7 @@ def check_type_size(self, type_name, headers=None, include_dirs=None, library_di
236236
# First check the type can be compiled
237237
body = r"""
238238
typedef %(type)s npy_check_sizeof_type;
239-
int main ()
239+
int main (void)
240240
{
241241
static int test_array [1 - 2 * !(((long) (sizeof (npy_check_sizeof_type))) >= 0)];
242242
test_array [0] = 0
@@ -252,7 +252,7 @@ def check_type_size(self, type_name, headers=None, include_dirs=None, library_di
252252
if expected:
253253
body = r"""
254254
typedef %(type)s npy_check_sizeof_type;
255-
int main ()
255+
int main (void)
256256
{
257257
static int test_array [1 - 2 * !(((long) (sizeof (npy_check_sizeof_type))) == %(size)s)];
258258
test_array [0] = 0
@@ -273,7 +273,7 @@ def check_type_size(self, type_name, headers=None, include_dirs=None, library_di
273273
# this fails to *compile* if size > sizeof(type)
274274
body = r"""
275275
typedef %(type)s npy_check_sizeof_type;
276-
int main ()
276+
int main (void)
277277
{
278278
static int test_array [1 - 2 * !(((long) (sizeof (npy_check_sizeof_type))) <= %(size)s)];
279279
test_array [0] = 0

0 commit comments

Comments
 (0)
0