bpo-43394: Fix -Wstrict-prototypes warnings (GH-24737)

This commit is contained in:
Brandt Bucher 2021-03-03 21:53:59 -08:00 committed by GitHub
parent 131d551640
commit c61ec7e6b8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 6 deletions

View File

@ -83,7 +83,7 @@ static int fuzz_builtin_unicode(const char* data, size_t size) {
PyObject* struct_unpack_method = NULL;
PyObject* struct_error = NULL;
/* Called by LLVMFuzzerTestOneInput for initialization */
static int init_struct_unpack() {
static int init_struct_unpack(void) {
/* Import struct.unpack */
PyObject* struct_module = PyImport_ImportModule("struct");
if (struct_module == NULL) {
@ -146,7 +146,7 @@ static int fuzz_struct_unpack(const char* data, size_t size) {
PyObject* json_loads_method = NULL;
/* Called by LLVMFuzzerTestOneInput for initialization */
static int init_json_loads() {
static int init_json_loads(void) {
/* Import json.loads */
PyObject* json_module = PyImport_ImportModule("json");
if (json_module == NULL) {
@ -192,7 +192,7 @@ PyObject* sre_compile_method = NULL;
PyObject* sre_error_exception = NULL;
int SRE_FLAG_DEBUG = 0;
/* Called by LLVMFuzzerTestOneInput for initialization */
static int init_sre_compile() {
static int init_sre_compile(void) {
/* Import sre_compile.compile and sre.error */
PyObject* sre_compile_module = PyImport_ImportModule("sre_compile");
if (sre_compile_module == NULL) {
@ -284,7 +284,7 @@ static const char* regex_patterns[] = {
const size_t NUM_PATTERNS = sizeof(regex_patterns) / sizeof(regex_patterns[0]);
PyObject** compiled_patterns = NULL;
/* Called by LLVMFuzzerTestOneInput for initialization */
static int init_sre_match() {
static int init_sre_match(void) {
PyObject* re_module = PyImport_ImportModule("re");
if (re_module == NULL) {
return 0;
@ -339,7 +339,7 @@ static int fuzz_sre_match(const char* data, size_t size) {
PyObject* csv_module = NULL;
PyObject* csv_error = NULL;
/* Called by LLVMFuzzerTestOneInput for initialization */
static int init_csv_reader() {
static int init_csv_reader(void) {
/* Import csv and csv.Error */
csv_module = PyImport_ImportModule("csv");
if (csv_module == NULL) {

View File

@ -2608,7 +2608,7 @@ static PyTypeObject PyZoneInfo_ZoneInfoType = {
// Specify the _zoneinfo module
static PyMethodDef module_methods[] = {{NULL, NULL}};
static void
module_free()
module_free(void)
{
Py_XDECREF(_tzpath_find_tzfile);
_tzpath_find_tzfile = NULL;