zephyrproject-rtos / zephyr

Primary Git Repository for the Zephyr Project. Zephyr is a new generation, scalable, optimized, secure RTOS for multiple hardware architectures.
https://docs.zephyrproject.org
Apache License 2.0
10.05k stars 6.18k forks source link

[Coverity CID: 392522] Unchecked return value in lib/os/zvfs/zvfs_eventfd.c #75258

Open zephyrbot opened 1 week ago

zephyrbot commented 1 week ago

Static code scan issues found in file:

https://github.com/zephyrproject-rtos/zephyr/tree/dcf42917c550714d2457947538b9e29d083e872e/lib/os/zvfs/zvfs_eventfd.c

Category: Error handling issues Function: zvfs_eventfd Component: Other CID: 392522

Details:

https://github.com/zephyrproject-rtos/zephyr/blob/dcf42917c550714d2457947538b9e29d083e872e/lib/os/zvfs/zvfs_eventfd.c#L428

Please fix or provide comments in coverity using the link:

https://scan9.scan.coverity.com/#/project-view/29271/12996?selectedIssue=392522

For more information about the violation, check the Coverity Reference. (CWE-252)

Note: This issue was created automatically. Priority was set based on classification of the file affected and the impact field in coverity. Assignees were set using the MAINTAINERS file.

cfriedt commented 6 days ago

I'll make a PR to cast the return value to (void). In any case, there is no check required as an error would never occur here.

I.e. it is a false positive, but coverity would never know that

aescolar commented 6 days ago

Reading the bug and priority label as otherwise this pops all the time during triage. Please do not remove the labels.