Skip to content

[Coverity CID: 220317] Unchecked return value in tests/kernel/pipe/pipe_api/src/test_pipe_contexts.c #33827

@zephyrbot

Description

@zephyrbot

Static code scan issues found in file:

https://github.com/zephyrproject-rtos/zephyr/tree/169144afa1826511ee6ec3f53d590b2c0d39d3d4/tests/kernel/pipe/pipe_api/src/test_pipe_contexts.c#L145

Category: Error handling issues
Function: tpipe_put_small_size
Component: Tests
CID: 220317

Details:

k_pipe_put(ppipe, &data[i], to_wt, &wt_byte, 1, timeout);

139     {
140         size_t to_wt, wt_byte = 0;
141    
142         for (int i = 0; i < PIPE_LEN; i += wt_byte) {
143             /**TESTPOINT: pipe put*/
144             to_wt = 15;
>>>     CID 220317:  Error handling issues  (CHECKED_RETURN)
>>>     Calling "k_pipe_put" without checking return value (as is done elsewhere 6 out of 7 times).
145             k_pipe_put(ppipe, &data[i], to_wt, &wt_byte, 1, timeout);
146         }
147     }
148    
149     static void tpipe_get_small_size(struct k_pipe *ppipe, k_timeout_t timeout)
150     {

Please fix or provide comments in coverity using the link:

https://scan9.coverity.com/reports.htm#v29271/p12996

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 CODEOWNERS file.

Metadata

Metadata

Assignees

Labels

CoverityA Coverity detected issue or its fixbugThe issue is a bug, or the PR is fixing a bugpriority: lowLow impact/importance bug

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions