From: Philippe Waroquiers Date: Fri, 23 Dec 2022 15:12:53 +0000 (+0100) Subject: Pass a dummy process_option_state for dynamic options X-Git-Tag: VALGRIND_3_21_0~267 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7e03a15d8d4f9a6fb50b59353a13f93ed0bafc3c;p=thirdparty%2Fvalgrind.git 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. --- 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