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

conf: fix clang warning when building w/o libcap #2216

Merged
merged 1 commit into from Mar 14, 2018

Conversation

3 participants
@igalic
Copy link
Contributor

commented Mar 14, 2018

when compiling lxc with clang-5.0 parse_cap()'s main loop will produce a
warning about a tautological comparision (#2215).

By moving the result of computation into a variable (end) this is no
longer a constant expression. clang-5.0 does not do dataflow analysis at
this point, so it is, to quote someone from #llvm, "morally equivalent"
to casting (int)i.

in addition, we also clean up the #if HAVE_LIBCAP to no longer need
its #else branch!

Signed-off-by: Igor Galić igor.galic@automatic-server.com

conf: fix clang warning when building w/o libcap
when compiling lxc with clang-5.0 parse_cap()'s main loop will produce a
warning about a tautological comparision (#2215).

By moving the result of computation into a variable (end) this is no
longer a constant expression. clang-5.0 does not do dataflow analysis at
this point, so it is, to quote someone from #llvm, "morally equivalent"
to casting `(int)i`.

in addition, we also clean up the #if HAVE_LIBCAP to no longer need
its #else branch!

Signed-off-by: Igor Galić <igor.galic@automatic-server.com>
@lxc-jenkins

This comment has been minimized.

Copy link

commented Mar 14, 2018

This pull request didn't trigger Jenkins as its author isn't in the whitelist.

An organization member must perform one of the following:

  • To have this branch tested by Jenkins, use the "ok to test" command.
  • To have a one time test done, use the "test this please" command.

Those commands are simple Github comments of the format: "jenkins: COMMAND"

@igalic

This comment has been minimized.

Copy link
Contributor Author

commented Mar 14, 2018

@brauner as promised

@brauner

This comment has been minimized.

Copy link
Member

commented Mar 14, 2018

jenkins: test this please

@brauner

This comment has been minimized.

Copy link
Member

commented Mar 14, 2018

@igalic thanks. :)

@brauner brauner merged commit 55fc780 into lxc:master Mar 14, 2018

4 checks passed

Branch target Branch target is correct
Details
DCO All commits signed-off
Details
Testsuite Testsuite passed
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@igalic igalic deleted the igalic:fix/clang-warning branch Mar 14, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.