|
Ran
|
Files
514
|
Run time
22s
|
Badge
README BADGES
|
push
github
Fix FP compilation warning in func_adapter test When I use LTO and warning-as-an-error locally with GCC 13 I got the following build failure: ```c In function ‘test_func_adapter_func_is_pinned’, inlined from ‘test_main’ at <...>/test/unit/func_adapter_func.c:142:2, inlined from ‘main’ at <...>/test/unit/func_adapter_func.c:163:11: <...>/test/unit/func_adapter_func.c:124:17: error: ‘returned_pin_type’ may be used uninitialized [-Werror=maybe-uninitialized] 124 | is(returned_pin_type, pin_type, | ^ <...>/test/unit/func_adapter_func.c: In function ‘main’: <...>/test/unit/func_adapter_func.c:121:39: note: ‘returned_pin_type’ was declared here 121 | enum func_holder_type returned_pin_type; | ^ lto1: all warnings being treated as errors ``` The build command: ```sh cmake -S . -B . -DCMAKE_BUILD_TYPE=RelWithDebInfo -DENABLE_WERROR=ON -DTEST_BUILD=ON -DENABLE_LTO=ON ``` The fix is suggested by Andrey Saranchin (@drewdzzz). This problem surprisingly happens in CI on increasing cmake minimum version to 3.5 (see #11382). Not sure about a reason, but since it hits me on `master` without any patches, that's definitely worth to fix. While I'm here, initialize the `enum func_holder_type` variables in the `func_cache` unit test. NO_DOC=compilation fix NO_TEST=compilation fix NO_CHANGELOG=compilation fix (cherry picked from commit ca4bdb052)
68918 of 122197 branches covered (56.4%)
101592 of 116240 relevant lines covered (87.4%)
1961737.55 hits per line
| Coverage | ∆ | File | Lines | Relevant | Covered | Missed | Hits/Line | Branch Hits | Branch Misses |
|---|