Skip to content

Commit

Permalink
[mypyc] Be stricter about function prototypes (#14942)
Browse files Browse the repository at this point in the history
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() {
```
  • Loading branch information
JukkaL committed Mar 23, 2023
1 parent 4e6d683 commit bfa9eac
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mypyc/lib-rt/float_ops.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit bfa9eac

Please sign in to comment.