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

sched0022_to_fn() does not return a value #47

Closed
axel-h opened this issue Aug 22, 2021 · 2 comments · Fixed by #49
Closed

sched0022_to_fn() does not return a value #47

axel-h opened this issue Aug 22, 2021 · 2 comments · Fixed by #49
Labels

Comments

@axel-h
Copy link
Member

axel-h commented Aug 22, 2021

The function sched0022_to_fn() does not return a value and the compiler complains

  [249/267] Building C object .../src/tests/scheduler.c.obj
  .../src/tests/scheduler.c:1653:1: warning: control reaches end of non-void function [-Wreturn-type]
  }
  ^
  1 warning generated.

I wonder, is there just a return sel4test_get_result(); missing?

@axel-h axel-h added the bug label Aug 22, 2021
@lsf37
Copy link
Member

lsf37 commented Aug 25, 2021

The function doesn't seem to perform any test asserts or similar, just performing some actions. So the correct thing to return is probably 0, but I'm not entirely sure what the convention is. @kent-mcleod or @yyshen, any input?

@yyshen
Copy link
Contributor

yyshen commented Aug 26, 2021

The function doesn't seem to perform any test asserts or similar, just performing some actions. So the correct thing to return is probably 0, but I'm not entirely sure what the convention is. @kent-mcleod or @yyshen, any input?

I think the test is fine. If you look at the calling function, test_changing_affinity. It checks the MRs set by the function as the results. A return 0 to avoid the warning should be enough, since the results are in MRs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants