Skip to content

Commit

Permalink
Fix #606, Resolve cast-align error in VxWorks OS_TaskGetId_Impl
Browse files Browse the repository at this point in the history
  • Loading branch information
skliper committed Dec 29, 2020
1 parent d698a4d commit b82270f
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/os/vxworks/src/os-impl-tasks.c
Original file line number Diff line number Diff line change
Expand Up @@ -400,16 +400,16 @@ int32 OS_TaskRegister_Impl(osal_id_t global_task_id)
*-----------------------------------------------------------------*/
osal_id_t OS_TaskGetId_Impl(void)
{
OS_impl_task_internal_record_t *lrec;
size_t idx;
osal_id_t id;
void *lrec;
size_t idx;
osal_id_t id;

id = OS_OBJECT_ID_UNDEFINED;
lrec = (OS_impl_task_internal_record_t *)taskTcb(taskIdSelf());
lrec = taskTcb(taskIdSelf());

if (lrec != NULL)
{
idx = lrec - &OS_impl_task_table[0];
idx = (OS_impl_task_internal_record_t *)lrec - &OS_impl_task_table[0];
if (idx < OS_MAX_TASKS)
{
id = OS_global_task_table[idx].active_id;
Expand Down

0 comments on commit b82270f

Please sign in to comment.