gcc4 noticed GenericThread::GetName() was returning a pointer to a local variable. No code is using this function, so it's safe to strdup() it. This class needs a serious restyling, though, as it doesn't conform to our coding guidelines
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27442 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -313,7 +313,7 @@ GenericThread::GetName(void)
|
|||||||
{
|
{
|
||||||
thread_info t_thread_info;
|
thread_info t_thread_info;
|
||||||
GetInfo(& t_thread_info);
|
GetInfo(& t_thread_info);
|
||||||
return (t_thread_info.name);
|
return strdup(t_thread_info.name);
|
||||||
}
|
}
|
||||||
|
|
||||||
thread_state
|
thread_state
|
||||||
|
|||||||
Reference in New Issue
Block a user