From 7e03a15d8d4f9a6fb50b59353a13f93ed0bafc3c Mon Sep 17 00:00:00 2001 From: Philippe Waroquiers Date: Fri, 23 Dec 2022 16:12:53 +0100 Subject: [PATCH] Pass a dummy process_option_state for dynamic options The process_option_state is functionally needed during initial parsing of CLO options. When later changing them, only changing the CLO itself is good enough. But the processing of option needs to have a state. --- coregrind/m_main.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/coregrind/m_main.c b/coregrind/m_main.c index f02a8b0eb5..2b4a8748ff 100644 --- a/coregrind/m_main.c +++ b/coregrind/m_main.c @@ -889,9 +889,9 @@ static void process_option (Clo_Mode mode, void VG_(process_dynamic_option) (Clo_Mode mode, HChar *value) { - process_option (mode, value, NULL); - // This is not supposed to change values in process_option_state, - // so we can give a NULL. + struct process_option_state dummy; + process_option (mode, value, &dummy); + // No need to handle a process_option_state once valgrind has started. } /* Peer at previously set up VG_(args_for_valgrind) and do some -- 2.47.2