From d69f67157f8c70f7978ee62b40eaae8888976111 Mon Sep 17 00:00:00 2001 From: Alberto Ortega Date: Mon, 8 Nov 2021 19:13:41 +0100 Subject: [PATCH] Fix compiler warnings --- pafish/Makefile64.linux | 2 +- pafish/utils.c | 3 ++- pafish/utils.h | 2 ++ 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/pafish/Makefile64.linux b/pafish/Makefile64.linux index eb405a9..c7b5ecc 100644 --- a/pafish/Makefile64.linux +++ b/pafish/Makefile64.linux @@ -10,7 +10,7 @@ LINKOBJ = $(OBJ) LIBS = -lwsock32 -liphlpapi -lsetupapi -lmpr -lole32 -lwbemuuid -loleaut32 -lws2_32 -s INCS = BIN = Output/MingW/pafish64.exe -CFLAGS = $(INCS) -Wall -Wextra -Wpedantic -O0 +CFLAGS = $(INCS) -Wall -Wextra -Wpedantic -O0 -Wno-cast-function-type all: $(BIN) diff --git a/pafish/utils.c b/pafish/utils.c index fc5deb4..da51315 100644 --- a/pafish/utils.c +++ b/pafish/utils.c @@ -284,7 +284,8 @@ int wmi_check_query(IWbemServices *services, const wchar_t *language, const wcha while (WBEM_S_NO_ERROR == result && status == FALSE) { // Retrieve 10 rows (instances) each time. - result = queryrows->lpVtbl->Next(queryrows, WBEM_INFINITE, 10, + // WBEM_INFINITE = 0xFFFFFFFF + result = queryrows->lpVtbl->Next(queryrows, 0xFFFFFFFF, 10, batchrows, &count); if (!SUCCEEDED(result)) { diff --git a/pafish/utils.h b/pafish/utils.h index 794cc9d..18d8920 100644 --- a/pafish/utils.h +++ b/pafish/utils.h @@ -6,10 +6,12 @@ #include #include +#ifndef _WDMDDK_ typedef struct _RTL_BITMAP { ULONG SizeOfBitMap; PULONG Buffer; } RTL_BITMAP, *PRTL_BITMAP; +#endif /* PEB data structure