From 30c93fcc11ce60a0815eac99f14d042923fa4853 Mon Sep 17 00:00:00 2001 From: Alex Leitner Date: Fri, 14 Jun 2024 11:41:00 -0400 Subject: [PATCH] GUACAMOLE-1026: Fix const correctness and unused variable warnings for FreeRDP3 checks. --- configure.ac | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/configure.ac b/configure.ac index 4fd71c8a..469f01e3 100644 --- a/configure.ac +++ b/configure.ac @@ -931,6 +931,7 @@ then int main() { CLIPRDR_FORMAT_LIST list; list.common.msgType = 0; + (void)list; return 0; } ]])], @@ -989,10 +990,22 @@ then AC_MSG_CHECKING([whether GetPluginData requires const for the returned args]) AC_COMPILE_IFELSE([AC_LANG_SOURCE([[ #include + /* A dummy function that matches the expected signature of GetPluginData */ + const ADDIN_ARGV* dummy_GetPluginData(IDRDYNVC_ENTRY_POINTS* pEntryPoints) { + return NULL; + } + int main() { - IDRDYNVC_ENTRY_POINTS test_entry_points; - const ADDIN_ARGV* args = test_entry_points.GetPluginData(&test_entry_points); - (void)args; + /* Create a dummy IDRDYNVC_ENTRY_POINTS struct */ + IDRDYNVC_ENTRY_POINTS entryPoints; + + /* Manually set the GetPluginData pointer for testing */ + entryPoints.GetPluginData = dummy_GetPluginData; + const ADDIN_ARGV* result = entryPoints.GetPluginData(&entryPoints); + + /* Casting to void to avoid unused variable warning */ + (void)result; + return 0; } ]])],