From 89224e9264597472b0ccc39d94e0bf266d770c55 Mon Sep 17 00:00:00 2001 From: Ilia Shipitsin Date: Sat, 29 Aug 2026 21:40:44 +0200 Subject: [PATCH] Fix incompatible pointer type warnings in SeLowUser.c Changed the types of `read_size` and `ret_size` from `UINT` to `DWORD` across several functions (`SuOpenAdapter`, `SuEnumAdapters`, `SuGetAdapterList`, and `SuInitEx`) in `SeLowUser.c` to resolve compiler warnings (`-Wincompatible-pointer-types`). The Windows API functions `DeviceIoControl` and `ReadFile` expect an `LPDWORD` (a pointer to an `unsigned long`) for their returned byte count parameters, whereas `UINT` maps to `unsigned int`. --- src/Cedar/SeLowUser.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Cedar/SeLowUser.c b/src/Cedar/SeLowUser.c index 1074adf9..6756761c 100644 --- a/src/Cedar/SeLowUser.c +++ b/src/Cedar/SeLowUser.c @@ -632,7 +632,7 @@ SU_ADAPTER *SuOpenAdapter(SU *u, char *adapter_id) void *h; SU_ADAPTER *a; SL_IOCTL_EVENT_NAME t; - UINT read_size; + DWORD read_size; // Validate arguments if (u == NULL || adapter_id == NULL) { @@ -690,7 +690,7 @@ SU_ADAPTER *SuOpenAdapter(SU *u, char *adapter_id) TOKEN_LIST *SuEnumAdapters(SU *u) { UINT i; - UINT ret_size; + DWORD ret_size; TOKEN_LIST *ret; // Validate arguments if (u == NULL) @@ -730,7 +730,7 @@ TOKEN_LIST *SuEnumAdapters(SU *u) LIST *SuGetAdapterList(SU *u) { LIST *ret; - UINT read_size; + DWORD read_size; UINT i; // Validate arguments if (u == NULL) @@ -893,7 +893,7 @@ SU *SuInitEx(UINT wait_for_bind_complete_tick) { void *h; SU *u; - UINT read_size; + DWORD read_size; bool flag = false; UINT64 giveup_tick = 0; static bool flag2 = false; // flag2 must be global