Re: [Mingw-w64-public] [PATCH] crt: Localize usage of startinfo variable

2024-12-04 Thread Martin Storsjö
On Tue, 3 Dec 2024, Pali Rohár wrote: On Tuesday 03 December 2024 16:33:01 Martin Storsjö wrote: On Wed, 27 Nov 2024, Pali Rohár wrote: Variable startinfo is used only by __(w)getmainargs() call passed by the pointer in pre_cpp_init() function. The __(w)getmainargs() function does not use or

Re: [Mingw-w64-public] [PATCH] crt: Localize usage of startinfo variable

2024-12-03 Thread Pali Rohár
On Tuesday 03 December 2024 16:33:01 Martin Storsjö wrote: > On Wed, 27 Nov 2024, Pali Rohár wrote: > > > Variable startinfo is used only by __(w)getmainargs() call passed by the > > pointer in pre_cpp_init() function. The __(w)getmainargs() function does > > not use or store the pointer value, so

Re: [Mingw-w64-public] [PATCH] crt: Localize usage of startinfo variable

2024-12-03 Thread Martin Storsjö
On Wed, 27 Nov 2024, Pali Rohár wrote: Variable startinfo is used only by __(w)getmainargs() call passed by the pointer in pre_cpp_init() function. The __(w)getmainargs() function does not use or store the pointer value, so the variable does not have to be static. Declare this variable just on t

[Mingw-w64-public] [PATCH] crt: Localize usage of startinfo variable

2024-11-27 Thread Pali Rohár
Variable startinfo is used only by __(w)getmainargs() call passed by the pointer in pre_cpp_init() function. The __(w)getmainargs() function does not use or store the pointer value, so the variable does not have to be static. Declare this variable just on the pre_cpp_init() function stack. --- min