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 broadphase warnings for clang (some conversion remain for g++) #268

Merged
merged 4 commits into from Mar 3, 2022

Conversation

wxmerkt
Copy link
Member

@wxmerkt wxmerkt commented Mar 2, 2022

No description provided.

Copy link
Member

@jcarpent jcarpent left a comment

Choose a reason for hiding this comment

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

I don't have any warning on my side. Could you give me the compiler and its version in use?

@wxmerkt
Copy link
Member Author

wxmerkt commented Mar 2, 2022

clang10 on Ubuntu 20.04:

clang version 10.0.0-4ubuntu1 
Target: x86_64-pc-linux-gnu

@jcarpent
Copy link
Member

jcarpent commented Mar 2, 2022

OK. I will accept it, even if I think this is a mistake from your compiler or maybe the Eigen version in use.
Normally, such an operation should not need a cast as the vector is made of double values.

@jmirabel
Copy link
Contributor

jmirabel commented Mar 3, 2022

By curiosity, can you check if you have a warning with an int instead of a long.

@wxmerkt
Copy link
Member Author

wxmerkt commented Mar 3, 2022

@jmirabel Indeed, I didn't see the warning in that case. Note, however that then we'd need to use a cast from long to int above.

@jmirabel
Copy link
Contributor

jmirabel commented Mar 3, 2022

Then I think it depends on the size of long your compiler uses.

Although minor to me and questionable, I think it makes more sense to use int (with a static cast). I don't think we will ever reach 2^31 leaves (except may be on very particular setup).

@wxmerkt wxmerkt requested a review from jcarpent March 3, 2022 13:15
@wxmerkt wxmerkt changed the title Fix implicit int to float cast warning Fix broadphase warnings for clang (some conversion remain for g++) Mar 3, 2022
@jcarpent
Copy link
Member

jcarpent commented Mar 3, 2022

I do think that the issue is coming from your compiler. I don't have such warnings with clang 13.0

@jmirabel
Copy link
Contributor

jmirabel commented Mar 3, 2022

It does not depend only on the compiler. If you want to be sure it's the compiler fault, you should check that sizeof(long) is the same with both setup.

@jcarpent jcarpent merged commit 47941ac into humanoid-path-planner:devel Mar 3, 2022
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

3 participants