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

Remove redundant instructions from tile hash #3898

Merged
5 changes: 5 additions & 0 deletions src/libtexture/imagecache_pvt.h
Original file line number Diff line number Diff line change
Expand Up @@ -570,7 +570,12 @@ struct TileID {
static_assert(
sizeof(*this) % sizeof(uint64_t) == 0,
"FastHash uses the fewest instructions when data size is a multiple of 8 bytes.");
// This appears to be a false positive which only affects GCC.
// https://godbolt.org/z/5q7Y7ndfb
OIIO_PRAGMA_WARNING_PUSH
OIIO_GCC_ONLY_PRAGMA(GCC diagnostic ignored "-Wuninitialized")
Copy link
Collaborator

Choose a reason for hiding this comment

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

Still failing. Based on the error message, I think this might need to be -Wmaybe-uninitialized?

return fasthash::fasthash64(this, sizeof(*this));
OIIO_PRAGMA_WARNING_POP
}

/// Functor that hashes a TileID
Expand Down
Loading