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

Fixes for building with gcc-6 / c++14 with PXR_STRICT_BUILD_MODE #869

Merged

Conversation

pmolodo
Copy link
Contributor

@pmolodo pmolodo commented Jun 7, 2019

Description of Change(s)

Were a few leftover warnings when I tried to build with gcc-6 / c++14... but not many, so I just fixed them up and bundled into a PR.

Fixes Issue(s)

  • Sign comparison warnings with gcc-6 / c++14
  • Unused function warnings with gcc-6 / c++14

@c64kernal
Copy link
Contributor

Thanks again @elrond79 -- there are some suggested changes that I'll take care of on our end, but wanted to leave them in the code so you know and in case you had other thoughts.

if (count == -1) {
return TfSpan<T>(_data + offset, _size - offset);
} else {
TF_DEV_AXIOM(count >= 0);
TF_DEV_AXIOM((offset+count) <= _size);
TF_DEV_AXIOM((index_type)(offset+count) <= _size);
Copy link
Contributor

Choose a reason for hiding this comment

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

Here, I've converted offset and count separately.

@@ -107,7 +107,7 @@ WorkParallelFilterN(size_t N,
&accumVector,
&starts](size_t begin, size_t end)
{
for(int j = begin; j < end; ++j){
for(size_t j = begin; j < end; ++j){
Copy link
Contributor

Choose a reason for hiding this comment

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

Thanks for fixing this, these are unused in pxr, so we'll be moving them out soonish.

@@ -215,7 +215,7 @@ _TestRandomAccessOperations(IteratorType first, IteratorType last)
{
TF_AXIOM(first != last);

size_t idx = 0;
decltype(first - last) idx = 0;
Copy link
Contributor

Choose a reason for hiding this comment

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

This one we thought to use std::iterator_traits::difference_type instead...

@c64kernal
Copy link
Contributor

And for all the usdAbc UNUSED_FUNCTIONS, we're just going to remove them. The ones in my previous change that I tagged this way was because we want to cause minimal difference to code that we integrated from elsewhere.

Hope all these make sense, and please let me know if you have any thoughts! (Again no action needed on your end). We'll likely get this merged in after we push 19.07 out.

Thanks again @elrond79

@pmolodo
Copy link
Contributor Author

pmolodo commented Jun 11, 2019

All that sounds fine to me, thanks!

@jilliene
Copy link

Filed as internal issue #USD-5376

@pixar-oss pixar-oss merged commit 3c245b5 into PixarAnimationStudios:dev Jun 25, 2019
pixar-oss added a commit that referenced this pull request Jun 25, 2019
Fixes for building with gcc-6 / c++14 with PXR_STRICT_BUILD_MODE

(Internal change: 1979617)
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.

5 participants