From f1cf29cefa91a24b3b164172b7c9b36a7845cc7a Mon Sep 17 00:00:00 2001
From: Charalampos Mitrodimas <charmitro@posteo.net>
Date: Wed, 20 Nov 2024 14:55:50 +0200
Subject: [PATCH 02/60] hlink: Fix function pointer cast in qsort()

Replace unsafe generic function pointer cast with proper type cast for
qsort() comparison function. This fixes a potential type mismatch
warning without changing the behavior.

Signed-off-by: Charalampos Mitrodimas <charmitro@posteo.net>
---
 hlink.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Index: rsync-3.1.3/hlink.c
===================================================================
--- rsync-3.1.3.orig/hlink.c
+++ rsync-3.1.3/hlink.c
@@ -118,8 +118,7 @@ static void match_gnums(int32 *ndx_list,
 	struct ht_int32_node *node = NULL;
 	int32 gnum, gnum_next;
 
-	qsort(ndx_list, ndx_count, sizeof ndx_list[0],
-	     (int (*)()) hlink_compare_gnum);
+	qsort(ndx_list, ndx_count, sizeof ndx_list[0], (int (*)(const void*, const void*))hlink_compare_gnum);
 
 	for (from = 0; from < ndx_count; from++) {
 		file = hlink_flist->sorted[ndx_list[from]];
