KhronosGroup / KhronosGroup/SYCL-CTS

Kernel bundle tests warning: non-void function does not return a value in all control paths

Open
#846 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
75
Forks
96
Avg merge
5d 18h
Merged PRs (30d)
4

Description

The following function triggers warning during CTS build:

https://github.com/KhronosGroup/SYCL-CTS/blob/9691bc093d4d5b8965be68bfb0716e20fda6205b/tests/kernel_bundle/use_kernel_bundle.h#L102-L115

Example of build log:

```
In file included from ../tests/kernel_bundle/use_kernel_bundle_call_set_spec_const_after_use_kb_no_second_queue.cpp:13:
../tests/kernel_bundle/use_kernel_bundle.h:115:1: warning: non-void function does not return a value in all control paths [-Wreturn-type]
115 | }
| ^
../tests/kernel_bundle/use_kernel_bundle_call_set_spec_const_after_use_kb_no_second_queue.cpp:73:9: note: in instantiation of function template specialization 'sycl_cts::tests::use_kernel_bundle::get_non_empty_bundle' requested here
73 | get_non_empty_bundle(ctx);
| ^
1 warning generated.
[426/1195] Building CXX object tests/kernel_bundle/CMakeFiles/test_kernel_bundle_objects.dir/use_kernel_bundle_call_set_spec_const_after_use_kb_with_second_queue.cpp.o
In file included from ../tests/kernel_bundle/use_kernel_bundle_call_set_spec_const_after_use_kb_with_second_queue.cpp:13:
../tests/kernel_bundle/use_kernel_bundle.h:115:1: warning: non-void function does not return a value in all control paths [-Wreturn-type]
115 | }
| ^
../tests/kernel_bundle/use_kernel_bundle_call_set_spec_const_after_use_kb_with_second_queue.cpp:76:9: note: in instantiation of function template specialization 'sycl_cts::tests::use_kernel_bundle::get_non_empty_bundle' requested here
76 | get_non_empty_bundle(ctx);
| ^
1 warning generated.
```

Contributor guide

Open the contributing guide

Research direction

Start with get_non_empty_bundle in tests/kernel_bundle/use_kernel_bundle.h at lines 102-115, then inspect the call sites named in the build log. Reproduce the CTS build for the kernel_bundle tests and verify that the non-void return warning is gone from the affected compilations.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
testing-qa
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
58/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.