Build test on debug only#45
Conversation
Codecov Report
@@ Coverage Diff @@
## master #45 +/- ##
=======================================
Coverage 98.11% 98.11%
=======================================
Files 23 23
Lines 2231 2231
Branches 384 384
=======================================
Hits 2189 2189
Partials 42 42
Continue to review full report at Codecov.
|
|
Still getting some warnings on sc_threads /home/delboni/Workspace/c/sc/thread/sc_thread.c: In function ‘sc_thread_start’:
/home/delboni/Workspace/c/sc/thread/sc_thread.c:127:9: error: ‘strncpy’ specified bound 128 equals destination size [-Werror=stringop-truncation]
127 | strncpy(thread->err, strerror(rc), sizeof(thread->err));
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/delboni/Workspace/c/sc/thread/sc_thread.c:118:9: error: ‘strncpy’ specified bound 128 equals destination size [-Werror=stringop-truncation]
118 | strncpy(thread->err, strerror(rc), sizeof(thread->err));
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[ 79%] Built target sc_option
[ 79%] Built target sc_heap
/home/delboni/Workspace/c/sc/thread/sc_thread.c: In function ‘sc_thread_join’:
/home/delboni/Workspace/c/sc/thread/sc_thread.c:147:9: error: ‘strncpy’ specified bound 128 equals destination size [-Werror=stringop-truncation]
147 | strncpy(thread->err, strerror(rc), sizeof(thread->err));
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|
Just add strncpy(thread->err, strerror(rc), sizeof(thread->err) - 1); |
|
You missed line 147 |
|
wow, my gcc & clang don't complain about that. Probably I and CI have older versions, I'll add newer versions to CI. |
|
I usually have to clean the build folder or make a different one for release and debug to have these warnings showing on haha Thanks, is working fine now! closes #44 |
|
Thanks a lot for issue & review |
No description provided.