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

fix a bug in the file contiki/core/sys/lc-switch.h #2579

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

fix a bug in the file contiki/core/sys/lc-switch.h #2579

wants to merge 1 commit into from

Conversation

LittleFatHero
Copy link

the bug is in the line 65. the ';' should be removed, it is redundant and may cause problem.
for example:

#define LC_INIT(s) s = 0;
#define PT_INIT(pt) LC_INIT((pt)->lc)
if we use PT_INIT just like it is use in the dhcpc.c file:
PT_INIT(&s.pt);
it is equal to :
s.pt->lc = 0**;;**
there will be two ';' in the code,so may be a problem sometimes in some conditions.

by the way , every version of contiki has this problem

the bug is in the line 65. the ';' should be removed, it is redundant and may cause problem.
@alexrayne
Copy link

what a problem you realy got? can you describe your situation?
s.pt->lc = 0**;;**
here is no problem for compiler, just skip it

alexrayne pushed a commit to alexrayne/contiki that referenced this pull request Nov 10, 2023
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.

2 participants