Fix acl_test.cpp Coverity issues by IlanTruanovsky · Pull Request #272 · intel/fpga-runtime-for-opencl (original) (raw)

This repository was archived by the owner on Mar 2, 2026. It is now read-only.

Conversation

@IlanTruanovsky

pcolberg

pcolberg

@IlanTruanovsky @pcolberg

Fixes:

test/acl_test.cpp:95:3:
  Type: Unchecked return value (CHECKED_RETURN)

test/acl_test.cpp:95:3: Unchecked call to function
  1. check_return: Calling "acl_set_hal" without checking return value (as is done elsewhere 28 out of 31 times).
src/acl_globals.cpp:182:3: Examples where return value from this function is checked
  2. example_checked: Example 1: "acl_set_hal(board_hal)" has its value checked in "acl_set_hal(board_hal)".
test/acl_globals_test.cpp:697:1: Examples where return value from this function is checked
  3. example_checked: Example 2: "acl_set_hal(acl_test_get_simple_hal())" has its value checked in "acl_set_hal(acl_test_get_simple_hal())".
test/acl_hal_test.cpp:303:3: Examples where return value from this function is checked
  4. example_checked: Example 3: "acl_set_hal(&simple_hal)" has its value checked in "acl_set_hal(&simple_hal)".
test/acl_hal_test.cpp:181:3: Examples where return value from this function is checked
  5. example_checked: Example 4: "acl_set_hal(&simple_hal)" has its value checked in "1 == acl_set_hal(&simple_hal)".
test/acl_hal_test.cpp:232:3: Examples where return value from this function is checked
  6. example_checked: Example 5: "acl_set_hal(&bad_hal)" has its value checked in "0 == acl_set_hal(&bad_hal)".

test/acl_test.cpp:102:3:
  Type: Unchecked return value (CHECKED_RETURN)

test/acl_test.cpp:102:3: Unchecked call to function
  1. check_return: Calling "acl_set_hal" without checking return value (as is done elsewhere 28 out of 31 times).
src/acl_globals.cpp:182:3: Examples where return value from this function is checked
  2. example_checked: Example 1: "acl_set_hal(board_hal)" has its value checked in "acl_set_hal(board_hal)".
test/acl_globals_test.cpp:697:1: Examples where return value from this function is checked
  3. example_checked: Example 2: "acl_set_hal(acl_test_get_simple_hal())" has its value checked in "acl_set_hal(acl_test_get_simple_hal())".
test/acl_hal_test.cpp:303:3: Examples where return value from this function is checked
  4. example_checked: Example 3: "acl_set_hal(&simple_hal)" has its value checked in "acl_set_hal(&simple_hal)".
test/acl_hal_test.cpp:181:3: Examples where return value from this function is checked
  5. example_checked: Example 4: "acl_set_hal(&simple_hal)" has its value checked in "1 == acl_set_hal(&simple_hal)".
test/acl_hal_test.cpp:232:3: Examples where return value from this function is checked
  6. example_checked: Example 5: "acl_set_hal(&bad_hal)" has its value checked in "0 == acl_set_hal(&bad_hal)".

test/acl_test.cpp:109:3:
  Type: Unchecked return value (CHECKED_RETURN)

test/acl_test.cpp:109:3: Unchecked call to function
  1. check_return: Calling "acl_set_hal" without checking return value (as is done elsewhere 28 out of 31 times).
src/acl_globals.cpp:182:3: Examples where return value from this function is checked
  2. example_checked: Example 1: "acl_set_hal(board_hal)" has its value checked in "acl_set_hal(board_hal)".
test/acl_globals_test.cpp:697:1: Examples where return value from this function is checked
  3. example_checked: Example 2: "acl_set_hal(acl_test_get_simple_hal())" has its value checked in "acl_set_hal(acl_test_get_simple_hal())".
test/acl_hal_test.cpp:303:3: Examples where return value from this function is checked
  4. example_checked: Example 3: "acl_set_hal(&simple_hal)" has its value checked in "acl_set_hal(&simple_hal)".
test/acl_hal_test.cpp:181:3: Examples where return value from this function is checked
  5. example_checked: Example 4: "acl_set_hal(&simple_hal)" has its value checked in "1 == acl_set_hal(&simple_hal)".
test/acl_hal_test.cpp:232:3: Examples where return value from this function is checked
  6. example_checked: Example 5: "acl_set_hal(&bad_hal)" has its value checked in "0 == acl_set_hal(&bad_hal)".

pcolberg

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters

[ Show hidden characters]({{ revealButtonHref }})