Commit 6caf08c
committed
mctp-bench: check getrandom return value
Some compiles will warn with:
../src/mctp-bench.c: In function ‘command’:
../src/mctp-bench.c:686:9: warning: ignoring return value of ‘getrandom’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
686 | getrandom(&req->iid, sizeof(req->iid), 0);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
getrandom() cannot fail with the length we're requesting, so suppress
the warning.
Signed-off-by: Jeremy Kerr <[email protected]>1 parent 832706c commit 6caf08c
1 file changed
+4
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
683 | 683 | | |
684 | 684 | | |
685 | 685 | | |
686 | | - | |
| 686 | + | |
| 687 | + | |
| 688 | + | |
| 689 | + | |
687 | 690 | | |
688 | 691 | | |
689 | 692 | | |
| |||
0 commit comments