aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Bugaev <bugaevc@gmail.com>2024-12-10 14:57:03 +0300
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2024-12-10 18:51:14 +0100
commitc438cc6adc172a76c71b7d6f248bfc3503c39bab (patch)
treef52ce4366290db522c5cd76e8d722bfccc3e99fa
parent5d1a540211adc9f9f96b80f2c037369b85b9edbd (diff)
downloadgnumach-c438cc6adc172a76c71b7d6f248bfc3503c39bab.tar.gz
gnumach-c438cc6adc172a76c71b7d6f248bfc3503c39bab.tar.bz2
gnumach-c438cc6adc172a76c71b7d6f248bfc3503c39bab.zip
Fix various function pointer types
Fixes Wincompatible-pointer-types errors on GCC 15. Signed-off-by: Sergey Bugaev <bugaevc@gmail.com> Message-ID: <20241210115705.710555-1-bugaevc@gmail.com>
-rw-r--r--ddb/db_variables.h2
-rw-r--r--i386/i386/trap.c2
-rw-r--r--vm/vm_fault.c4
-rw-r--r--vm/vm_map.c2
-rw-r--r--vm/vm_map.h8
5 files changed, 9 insertions, 9 deletions
diff --git a/ddb/db_variables.h b/ddb/db_variables.h
index 9880d50f..2929dab9 100644
--- a/ddb/db_variables.h
+++ b/ddb/db_variables.h
@@ -51,7 +51,7 @@ struct db_variable {
#define DB_VAR_GET 0
#define DB_VAR_SET 1
};
-#define FCN_NULL ((void (*)())0)
+#define FCN_NULL ((void (*)(struct db_variable *, db_expr_t *, int, db_var_aux_param_t))0)
#define DB_VAR_LEVEL 3 /* maximum number of suffix level */
diff --git a/i386/i386/trap.c b/i386/i386/trap.c
index 555d7498..a9d0d8d2 100644
--- a/i386/i386/trap.c
+++ b/i386/i386/trap.c
@@ -245,7 +245,7 @@ dump_ss(regs);
#endif
FALSE,
FALSE,
- (void (*)()) 0);
+ vm_fault_no_continuation);
#if MACH_KDB
if (result == KERN_SUCCESS) {
/* Look for watchpoints */
diff --git a/vm/vm_fault.c b/vm/vm_fault.c
index d99425a3..ef6b5656 100644
--- a/vm/vm_fault.c
+++ b/vm/vm_fault.c
@@ -1520,7 +1520,7 @@ void vm_fault_wire(
for (va = entry->vme_start; va < end_addr; va += PAGE_SIZE) {
if (vm_fault_wire_fast(map, va, entry) != KERN_SUCCESS)
(void) vm_fault(map, va, VM_PROT_NONE, TRUE,
- FALSE, (void (*)()) 0);
+ FALSE, vm_fault_no_continuation);
}
}
@@ -1554,7 +1554,7 @@ void vm_fault_unwire(
if (object == VM_OBJECT_NULL) {
vm_map_lock_set_recursive(map);
(void) vm_fault(map, va, VM_PROT_NONE, TRUE,
- FALSE, (void (*)()) 0);
+ FALSE, vm_fault_no_continuation);
vm_map_lock_clear_recursive(map);
} else {
vm_prot_t prot;
diff --git a/vm/vm_map.c b/vm/vm_map.c
index 56928369..03d22ea1 100644
--- a/vm/vm_map.c
+++ b/vm/vm_map.c
@@ -3927,7 +3927,7 @@ kern_return_t vm_map_copyin_page_list(
copy->cpy_npages = 0;
copy->offset = src_addr;
copy->size = len;
- copy->cpy_cont = ((kern_return_t (*)()) 0);
+ copy->cpy_cont = (vm_map_copy_cont_fn) 0;
copy->cpy_cont_args = VM_MAP_COPYIN_ARGS_NULL;
/*
diff --git a/vm/vm_map.h b/vm/vm_map.h
index 7e25d9f4..900f1218 100644
--- a/vm/vm_map.h
+++ b/vm/vm_map.h
@@ -311,14 +311,14 @@ MACRO_BEGIN \
vm_map_copy_page_discard(old_copy); \
*result = (*((old_copy)->cpy_cont))((old_copy)->cpy_cont_args, \
new_copy); \
- (old_copy)->cpy_cont = (kern_return_t (*)()) 0; \
+ (old_copy)->cpy_cont = (vm_map_copy_cont_fn) 0; \
MACRO_END
#define vm_map_copy_invoke_extend_cont(old_copy, new_copy, result) \
MACRO_BEGIN \
*result = (*((old_copy)->cpy_cont))((old_copy)->cpy_cont_args, \
new_copy); \
- (old_copy)->cpy_cont = (kern_return_t (*)()) 0; \
+ (old_copy)->cpy_cont = (vm_map_copy_cont_fn) 0; \
MACRO_END
#define vm_map_copy_abort_cont(old_copy) \
@@ -326,12 +326,12 @@ MACRO_BEGIN \
vm_map_copy_page_discard(old_copy); \
(*((old_copy)->cpy_cont))((old_copy)->cpy_cont_args, \
(vm_map_copy_t *) 0); \
- (old_copy)->cpy_cont = (kern_return_t (*)()) 0; \
+ (old_copy)->cpy_cont = (vm_map_copy_cont_fn) 0; \
(old_copy)->cpy_cont_args = VM_MAP_COPYIN_ARGS_NULL; \
MACRO_END
#define vm_map_copy_has_cont(copy) \
- (((copy)->cpy_cont) != (kern_return_t (*)()) 0)
+ (((copy)->cpy_cont) != (vm_map_copy_cont_fn) 0)
/*
* Continuation structures for vm_map_copyin_page_list.