Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix incompatible pointer type warning by typecast #8

Open
wants to merge 1 commit into
base: staging
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions attributes.c
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ int pthread_getattr_np(pthread_t thread, pthread_attr_t *attr)
if (attr == NULL || *attr == NULL)
return EINVAL;

_uk_thread = tp->threadId;
_uk_thread = (struct uk_thread *) tp->threadId;
_attr = *attr;
_attr->stackaddr = _uk_thread->stack;
_attr->stacksize = __STACK_SIZE;
Expand All @@ -119,7 +119,7 @@ int pthread_setname_np(pthread_t thread, const char *name)
if (tp == NULL || tp->threadId == NULL)
return ENOENT;

_uk_thread = tp->threadId;
_uk_thread = (struct uk_thread *) tp->threadId;

len = strnlen(name, 16);
if (len > 15)
Expand All @@ -139,7 +139,7 @@ int pthread_getname_np(pthread_t thread, char *name, size_t len)
if (tp == NULL || tp->threadId == NULL)
return ENOENT;

_uk_thread = tp->threadId;
_uk_thread = (struct uk_thread *) tp->threadId;

_len = strlen(_uk_thread->name);
if (len < _len + 1)
Expand Down