Fixing warnings under GCC4 in preparation to enable -Werror there as well:
* Replaced the use of offsetof() for structs that aren't PODs. Add a offset_of_member() macro to util/khash.h because that's what it's used for in our cases. * Change the signature of add_debugger_command()/remove_debugger_command() on GCC > 2 to avoid the depricated conversion from string constants to char *. * Adding some "suggested" parenthesis. I know that not everyone likes that, but it pointed out at least one bug that is fixed here as well. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29113 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -2724,8 +2724,8 @@ _user_spawn_thread(thread_creation_attributes* userAttributes)
|
||||
thread_id threadID;
|
||||
|
||||
if (!IS_USER_ADDRESS(attributes.entry) || attributes.entry == NULL
|
||||
|| attributes.stack_address != NULL
|
||||
&& !IS_USER_ADDRESS(attributes.stack_address)
|
||||
|| (attributes.stack_address != NULL
|
||||
&& !IS_USER_ADDRESS(attributes.stack_address))
|
||||
|| (attributes.name != NULL && (!IS_USER_ADDRESS(attributes.name)
|
||||
|| user_strlcpy(name, attributes.name, B_OS_NAME_LENGTH) < 0)))
|
||||
return B_BAD_ADDRESS;
|
||||
|
||||
Reference in New Issue
Block a user