-
Notifications
You must be signed in to change notification settings - Fork 245
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
Portability fixes and compiler warning fixes #9
Conversation
8a48198
to
16aa6aa
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@lnicco has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
Thank you for contributing! Can you remove the changes for fixing unsigned/signed comparisons? As you noted it is in test code, and the comparisons are actually not unsafe. I'm additionally not a fan of the U UL and ULL suffixes as most of mvfst uses fixed length integral types, for which there are not convenient C++ suffixes. Can you instead disable the warning for tests? |
16aa6aa
to
350692b
Compare
Done! Took a little bit because I had to learn a bit about cmake. I also added a commit about some |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mjoras has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
350692b
to
ce90b7d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mjoras has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
ce90b7d
to
504a9c7
Compare
cc04e26
to
5f63e30
Compare
Remove a commented-out line, and remove what looks like a leftover debug message. Signed-off-by: Jeff Squyres <jeff@squyres.com>
Only add -Werror=bool-compare if the compiler actually supports it. Some compilers do not (e.g., MacOS Mojave 10.14 Apple LLVM version 10.0.1 (clang-1001.0.46.4)). Signed-off-by: Jeff Squyres <jeff@squyres.com>
Suppress compiler warnings by marking a sometimes-unused function parameter. Signed-off-by: Jeff Squyres <jeff@squyres.com>
Quiet compiler warnings by adding a _Nonnull qualifier to the return of QuicStreamManager::getStream(). Signed-off-by: Jeff Squyres <jeff@squyres.com>
Disable some compiler warnings that originate from -Wextra in _QUIC_BASE_COMPILE_OPTIONS. E.g., without -Wno-sign-compare, we get oodles of warnings in the tests about comparing unsigned variables with integer constants. Signed-off-by: Jeff Squyres <jeff@squyres.com>
5f63e30
to
ca74a2e
Compare
@mjoras Unless you have another suggestion, I don't see a way to avoid the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mjoras has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
CMakeLists.txt
-Werror=bool-compare
if the compiler actually supports itFOLLY_MAYBE_UNUSED
to avoid compiler warnings