WinUAE
WinUAE copied to clipboard
cfgfile_option_find_it returns address of local variable
In cfgfile.cpp
, function:
static TCHAR *cfgfile_option_find_it(const TCHAR *s, const TCHAR *option, bool checkequals)
{
TCHAR buf[MAX_DPATH];
I'm seeing a compiler warning: warning: function may return address of local variable [-Wreturn-local-addr]
Should that variable be marked as static
perhaps?
It does not return local variable, it always returns newly allocated string.