Skip to content

Commit c61ec7e

Browse files
authored
bpo-43394: Fix -Wstrict-prototypes warnings (GH-24737)
1 parent 131d551 commit c61ec7e

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

Modules/_xxtestfuzz/fuzzer.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ static int fuzz_builtin_unicode(const char* data, size_t size) {
8383
PyObject* struct_unpack_method = NULL;
8484
PyObject* struct_error = NULL;
8585
/* Called by LLVMFuzzerTestOneInput for initialization */
86-
static int init_struct_unpack() {
86+
static int init_struct_unpack(void) {
8787
/* Import struct.unpack */
8888
PyObject* struct_module = PyImport_ImportModule("struct");
8989
if (struct_module == NULL) {
@@ -146,7 +146,7 @@ static int fuzz_struct_unpack(const char* data, size_t size) {
146146

147147
PyObject* json_loads_method = NULL;
148148
/* Called by LLVMFuzzerTestOneInput for initialization */
149-
static int init_json_loads() {
149+
static int init_json_loads(void) {
150150
/* Import json.loads */
151151
PyObject* json_module = PyImport_ImportModule("json");
152152
if (json_module == NULL) {
@@ -192,7 +192,7 @@ PyObject* sre_compile_method = NULL;
192192
PyObject* sre_error_exception = NULL;
193193
int SRE_FLAG_DEBUG = 0;
194194
/* Called by LLVMFuzzerTestOneInput for initialization */
195-
static int init_sre_compile() {
195+
static int init_sre_compile(void) {
196196
/* Import sre_compile.compile and sre.error */
197197
PyObject* sre_compile_module = PyImport_ImportModule("sre_compile");
198198
if (sre_compile_module == NULL) {
@@ -284,7 +284,7 @@ static const char* regex_patterns[] = {
284284
const size_t NUM_PATTERNS = sizeof(regex_patterns) / sizeof(regex_patterns[0]);
285285
PyObject** compiled_patterns = NULL;
286286
/* Called by LLVMFuzzerTestOneInput for initialization */
287-
static int init_sre_match() {
287+
static int init_sre_match(void) {
288288
PyObject* re_module = PyImport_ImportModule("re");
289289
if (re_module == NULL) {
290290
return 0;
@@ -339,7 +339,7 @@ static int fuzz_sre_match(const char* data, size_t size) {
339339
PyObject* csv_module = NULL;
340340
PyObject* csv_error = NULL;
341341
/* Called by LLVMFuzzerTestOneInput for initialization */
342-
static int init_csv_reader() {
342+
static int init_csv_reader(void) {
343343
/* Import csv and csv.Error */
344344
csv_module = PyImport_ImportModule("csv");
345345
if (csv_module == NULL) {

Modules/_zoneinfo.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2608,7 +2608,7 @@ static PyTypeObject PyZoneInfo_ZoneInfoType = {
26082608
// Specify the _zoneinfo module
26092609
static PyMethodDef module_methods[] = {{NULL, NULL}};
26102610
static void
2611-
module_free()
2611+
module_free(void)
26122612
{
26132613
Py_XDECREF(_tzpath_find_tzfile);
26142614
_tzpath_find_tzfile = NULL;

0 commit comments

Comments
 (0)