From bfa9eacedb0554e1a6fe9245dbd5ccdbbc555fae Mon Sep 17 00:00:00 2001 From: Jukka Lehtosalo Date: Thu, 23 Mar 2023 12:21:48 +0000 Subject: [PATCH] [mypyc] Be stricter about function prototypes (#14942) I'm trying to fix this error: ``` float_ops.c:9:15: error: function declaration isn't a prototype [-Werror=strict-prototypes] 9 | static double CPy_DomainError() { ``` --- mypyc/lib-rt/float_ops.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mypyc/lib-rt/float_ops.c b/mypyc/lib-rt/float_ops.c index f9ff47848dc6..d8c6f25955fa 100644 --- a/mypyc/lib-rt/float_ops.c +++ b/mypyc/lib-rt/float_ops.c @@ -6,12 +6,12 @@ #include "CPy.h" -static double CPy_DomainError() { +static double CPy_DomainError(void) { PyErr_SetString(PyExc_ValueError, "math domain error"); return CPY_FLOAT_ERROR; } -static double CPy_MathRangeError() { +static double CPy_MathRangeError(void) { PyErr_SetString(PyExc_OverflowError, "math range error"); return CPY_FLOAT_ERROR; }