Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Coverity CID :208207] Arguments in wrong order in tests/subsys/canbus/isotp/conformance/src/main.c #22642

Closed
zephyrbot opened this issue Feb 9, 2020 · 1 comment
Assignees
Labels
bug The issue is a bug, or the PR is fixing a bug Coverity A Coverity detected issue or its fix priority: low Low impact/importance bug

Comments

@zephyrbot
Copy link
Collaborator

Static code scan issues found in file:

https://github.com/zephyrproject-rtos/zephyr/tree/e089906b339aad4cd1b6589a3b6ce94782d93f54/tests/subsys/canbus/isotp/conformance/src/main.c#L364

Category: API usage errors
Function: test_send_sf_ext
Component: Tests
CID: 208207

Details:

358         des_frame.length = DATA_SIZE_SF_EXT + 2;
359    
360         filter_id = attach_msgq(rx_addr_ext.std_id);
361         zassert_true((filter_id >= 0), "Negative filter number [%d]",
362                  filter_id);
363    
>>>     CID 208207:  API usage errors  (SWAPPED_ARGUMENTS)
>>>     The positions of arguments in the call to "isotp_send" do not match the ordering of the parameters:
364         ret = isotp_send(&send_ctx, can_dev, random_data, DATA_SIZE_SF_EXT,
365                  &rx_addr_ext, &tx_addr_ext, send_complette_cb,
366                   ISOTP_N_OK);
367         zassert_equal(ret, 0, "Send returned %d", ret);
368    
369         check_frame_series(&des_frame, 1, &frame_msgq);

Please fix or provide comments in coverity using the link:

https://scan9.coverity.com/reports.htm#v32951/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.

@zephyrbot zephyrbot added bug The issue is a bug, or the PR is fixing a bug Coverity A Coverity detected issue or its fix priority: low Low impact/importance bug labels Feb 9, 2020
@nashif nashif assigned alexanderwachter and unassigned nashif Feb 9, 2020
@alexanderwachter
Copy link
Member

We have receiver and sender on the same node, so we need to switch the addresses somewhere.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug The issue is a bug, or the PR is fixing a bug Coverity A Coverity detected issue or its fix priority: low Low impact/importance bug
Projects
None yet
Development

No branches or pull requests

3 participants