RTEMS | aio_fsync.c: Address Coverity dead code issue (!165)

Joel Sherrill (@joel) gitlab at rtems.org
Mon Aug 5 14:40:08 UTC 2024



Joel Sherrill created a merge request: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/165

Project:Branches: joel/rtems:fix_aio_fsync to rtems/rtos/rtems:main
Author:   Joel Sherrill
Assignee: Joel Sherrill



## Summary

aio_fsync.c: Address Coverity dead code issue

Coverity CID 1616018

O_SYNC and O_DSYNC have the same value which led Coverity to note that
checking for both values in if's or switches leads to dead code. The
solution is to add a cpp check that they are equal and enough commentary
so if they ever are not the same, there is a hint as to why the cpp
check got tripped.

Closes #5100.


<!-- Default settings, if it is a dropdown it will set after submission -->

-- 
View it on GitLab: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/165
You're receiving this email because of your account on gitlab.rtems.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/bugs/attachments/20240805/23884819/attachment-0001.htm>


More information about the bugs mailing list