mirror of
https://github.com/amadvance/snapraid.git
synced 2026-10-26 19:01:57 -04:00
Fix undefined behavior by making TommyDS foreach callback signatures take void*
Some checks are pending
Build / build-mac (push) Waiting to run
Build / build-linux (push) Waiting to run
Build / build-arm32 (push) Waiting to run
Build / build-win (push) Waiting to run
CodeQL Advanced / Analyze (c-cpp) (push) Waiting to run
CodeQL Advanced / Analyze (actions) (push) Waiting to run
Some checks are pending
Build / build-mac (push) Waiting to run
Build / build-linux (push) Waiting to run
Build / build-arm32 (push) Waiting to run
Build / build-win (push) Waiting to run
CodeQL Advanced / Analyze (c-cpp) (push) Waiting to run
CodeQL Advanced / Analyze (actions) (push) Waiting to run
This commit is contained in:
parent
7250521e66
commit
fd65dbd9ea
13 changed files with 84 additions and 53 deletions
|
|
@ -74,8 +74,9 @@ static struct snapraid_scan* scan_alloc(struct snapraid_state* state, struct sna
|
|||
return scan;
|
||||
}
|
||||
|
||||
static void scan_free(struct snapraid_scan* scan)
|
||||
static void scan_free(void* void_scan)
|
||||
{
|
||||
struct snapraid_scan* scan = void_scan;
|
||||
#if HAVE_THREAD
|
||||
thread_mutex_destroy(&scan->disk->stamp_mutex);
|
||||
#endif
|
||||
|
|
@ -2249,7 +2250,7 @@ static int state_diffscan(struct snapraid_state* state, int is_diff)
|
|||
|
||||
log_flush();
|
||||
|
||||
tommy_list_foreach(&scanlist, (tommy_foreach_func*)scan_free);
|
||||
tommy_list_foreach(&scanlist, scan_free);
|
||||
|
||||
/* check the file-system on all disks */
|
||||
state_fscheck(state, "after scan");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue