mirror of
https://github.com/obgm/libcoap.git
synced 2026-11-10 19:00:40 +03:00
net.c: fix check_return false positive from Coverity
In coap_io_do_epoll(), read() is called after timeout to clear the file descriptor associated with the firing timer. As this function is only called for its side effect, the result is ignored. Coverity scan reports this as check_return event. A cast to void has been added to document that the result is ignored on purpose. This fixes CID 1495728.
This commit is contained in:
1 parent
f97a7c5bde
commit
9c64e90517
1 file changed
+1
-1
@@ -1586,7 +1586,7 @@ coap_io_do_epoll(coap_context_t *ctx, struct epoll_event *events, size_t nevents
|
||||
*/
|
||||
uint64_t count;
|
||||
|
||||
read(ctx->eptimerfd, &count, sizeof(count));
|
||||
(void)read(ctx->eptimerfd, &count, sizeof(count));
|
||||
/* And process any timed out events */
|
||||
coap_ticks(&now);
|
||||
coap_io_prepare_epoll(ctx, now);
|
||||
|
||||
Reference in new issue
Block a user