mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-28 07:51:11 +02:00
helpers: fix warning in neutrinoMode_to_string();
cc1plus: warning: function may return address of local variable [-Wreturn-local-addr]
../src/system/helpers.cpp:114:16: note: declared here
std::string res = s.str();
^~~
Origin commit data
------------------
Branch: ni/coolstream
Commit: 86e0ee951d
Author: vanhofen <vanhofen@gmx.de>
Date: 2022-04-18 (Mon, 18 Apr 2022)
Origin message was:
------------------
- helpers: fix warning in neutrinoMode_to_string();
cc1plus: warning: function may return address of local variable [-Wreturn-local-addr]
../src/system/helpers.cpp:114:16: note: declared here
std::string res = s.str();
^~~
------------------
This commit was generated by Migit
This commit is contained in:
@@ -111,8 +111,7 @@ const char* neutrinoMode_to_string(int mode)
|
|||||||
return "NO_REZAP";
|
return "NO_REZAP";
|
||||||
default:
|
default:
|
||||||
s << std::hex << mode;
|
s << std::hex << mode;
|
||||||
std::string res = s.str();
|
return s.str().c_str();
|
||||||
return res.c_str();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user