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

Cast-align warning in OS_TaskGetId_Impl for vxworks #606

Closed
skliper opened this issue Sep 23, 2020 · 0 comments · Fixed by #720 or #750
Closed

Cast-align warning in OS_TaskGetId_Impl for vxworks #606

skliper opened this issue Sep 23, 2020 · 0 comments · Fixed by #720 or #750
Milestone

Comments

@skliper
Copy link
Contributor

skliper commented Sep 23, 2020

Is your feature request related to a problem? Please describe.

/home/jhageman/cFS-GitHub/osal/src/os/vxworks/src/os-impl-tasks.c: In function ‘OS_TaskGetId_Impl’:
/home/jhageman/cFS-GitHub/osal/src/os/vxworks/src/os-impl-tasks.c:411:12: warning: cast increases required alignment of target type [-Wcast-align]
  411 |     lrec = (OS_impl_task_internal_record_t *)taskTcb(taskIdSelf());

Recreate by building on Ubuntu 20.04, set cast-align=strict in sample_defs/arch_build_custom.cmake and prep with ENABLE_UNIT_TESTS=true

Describe the solution you'd like
Resolve warnings.

Describe alternatives you've considered
None

Additional context
Observed on Ubuntu 20.04 w/ cast-align=strict

Requester Info
Jacob Hageman - NASA/GSFC

@skliper skliper added this to the 6.0.0 milestone Sep 23, 2020
astrogeco added a commit that referenced this issue Jan 12, 2021
Fix #606, Resolve cast-align error in VxWorks OS_TaskGetId_Impl
jphickey pushed a commit to jphickey/osal that referenced this issue Aug 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants