Skip to content

Commit

Permalink
Merge pull request #720 from skliper/fix606_cast-align-err
Browse files Browse the repository at this point in the history
Fix #606, Resolve cast-align error in VxWorks OS_TaskGetId_Impl
  • Loading branch information
astrogeco authored Jan 12, 2021
2 parents 52aed2a + b82270f commit 89bd11a
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 @@ -414,16 +414,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 89bd11a

Please sign in to comment.