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

Build test on debug only #45

Merged
merged 5 commits into from
Feb 16, 2021
Merged

Build test on debug only #45

merged 5 commits into from
Feb 16, 2021

Conversation

tezc
Copy link
Owner

@tezc tezc commented Feb 16, 2021

No description provided.

@codecov
Copy link

codecov bot commented Feb 16, 2021

Codecov Report

Merging #45 (77e697a) into master (ed5bcab) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master      #45   +/-   ##
=======================================
  Coverage   98.11%   98.11%           
=======================================
  Files          23       23           
  Lines        2231     2231           
  Branches      384      384           
=======================================
  Hits         2189     2189           
  Partials       42       42           
Impacted Files Coverage Δ
condition/sc_cond.c 97.95% <ø> (ø)
mutex/sc_mutex.c 100.00% <ø> (ø)
time/sc_time.c 100.00% <ø> (ø)
signal/sc_signal.c 95.23% <100.00%> (ø)
thread/sc_thread.c 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ed5bcab...77e697a. Read the comment docs.

@rafaeldelboni
Copy link
Contributor

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));
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

@rafaeldelboni
Copy link
Contributor

rafaeldelboni commented Feb 16, 2021

Just add - 1 at the end of those lines:

        strncpy(thread->err, strerror(rc), sizeof(thread->err) - 1);

@rafaeldelboni
Copy link
Contributor

You missed line 147 sc/thread/sc_thread.c:147 :)

@tezc
Copy link
Owner Author

tezc commented Feb 16, 2021

wow, my gcc & clang don't complain about that. Probably I and CI have older versions, I'll add newer versions to CI.

@rafaeldelboni
Copy link
Contributor

rafaeldelboni commented Feb 16, 2021

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

Copy link
Contributor

@rafaeldelboni rafaeldelboni left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

closes #44

@tezc
Copy link
Owner Author

tezc commented Feb 16, 2021

Thanks a lot for issue & review

@tezc tezc merged commit 950d6f1 into master Feb 16, 2021
@tezc tezc deleted the build-test-on-debug branch February 16, 2021 01:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants