Skip to contentSkip to conversation

Fix: unchecked return value in low throughput test

PATCH Jérémie Galarneau 1 participant 1 message May 18, 2016 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

Jérémie Galarneau

author Applied
#1 lore raw

Merged, thanks!

Jérérmie

Quoted 30 lines · Mathieu Desnoyers

Found by Coverity:

CID 1019967 (#1 of 1): Unchecked return value from library (CHECKED_RETURN)2. check_return: Calling poll(NULL, 0UL, 60000) without checking return value. This library function may fail and return an error code.

We really don't care whether this poll succeeds or not.

---
 tests/regression/ust/low-throughput/main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tests/regression/ust/low-throughput/main.c +1 -2
index 06ab9ef..b1c38bc 100644
@@ -34,7 +34,7 @@ static void *th_event_minute(void *data)
        /* Loop for 20 minutes */
        for (i = 1; i < 21; i++) {
                /* Sleep 60 seconds */
-               poll(NULL, 0, 60000);
+               (void) poll(NULL, 0, 60000);
 
                /* 20 minutes tracepoint */
                if ((i % 20) == 0) {
--

2.1.4

Signature · 7 lines
Jérémie Galarneau
EfficiOS Inc.
http://www.efficios.com
_______________________________________________
lttng-dev mailing list
[email protected]
https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev