-
Notifications
You must be signed in to change notification settings - Fork 15
HYRAX-2000 warnings in tests #333
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
Merged
Merged
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
e985c3c
RCReaderTest fixed
jgallagher59701 1fd405b
More fixes for RCReaderTest
jgallagher59701 ab8d281
Fixed warnings in MarshallerTest
jgallagher59701 cd2a29f
more fixes in MarshallerTest
jgallagher59701 ef80bfd
more fixes in MarshallerTest
jgallagher59701 69ff86c
Suppress warnings for a range of lines in XDRUtil.cc
jgallagher59701 e208501
Added reference for the warning suppression macro
jgallagher59701 f386c2a
Reinstate <cstring>
jgallagher59701 a3c6df7
Reinstate <cstring> in RCReaderTest
jgallagher59701 03a2f95
Reinstate <cstring> in MarshallerTest
jgallagher59701 ad4f7d4
Added diagnostic_suppression.h to Makefile.am for distcheck
jgallagher59701 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -35,6 +35,7 @@ | |
| #include "Str.h" | ||
| #include "XDRUtils.h" | ||
| #include "debug.h" | ||
| #include "diagnostic_suppression.h" | ||
|
|
||
| using namespace libdap; | ||
|
|
||
|
|
@@ -135,7 +136,7 @@ namespace libdap { | |
| @return A C function used to encode data in the XDR format. | ||
| */ | ||
| xdrproc_t XDRUtils::xdr_coder(const Type &t) { | ||
| switch (t) { | ||
| A_cast_function_type_mismatch switch (t) { | ||
| case dods_int16_c: | ||
| return reinterpret_cast<xdrproc_t>(XDR_INT16); | ||
| case dods_uint16_c: | ||
|
|
@@ -148,6 +149,7 @@ xdrproc_t XDRUtils::xdr_coder(const Type &t) { | |
| return reinterpret_cast<xdrproc_t>(XDR_FLOAT32); | ||
| case dods_float64_c: | ||
| return reinterpret_cast<xdrproc_t>(XDR_FLOAT64); | ||
|
|
||
| case dods_byte_c: | ||
| case dods_str_c: | ||
| case dods_url_c: | ||
|
|
@@ -158,8 +160,7 @@ xdrproc_t XDRUtils::xdr_coder(const Type &t) { | |
| default: | ||
| break; | ||
| } | ||
|
|
||
| return NULL; | ||
| A_Pop return nullptr; | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same comment as the above for A_pop. |
||
| } | ||
|
|
||
| } // namespace libdap | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| // | ||
| // Created by James Gallagher on 1/26/26. | ||
| // | ||
|
|
||
| #ifndef LIBDAP_DIAGNOSTIC_SUPPRESSION_H | ||
| #define LIBDAP_DIAGNOSTIC_SUPPRESSION_H | ||
|
|
||
| // Define a macro for convenience. To keep things simple, use a macro for | ||
| // each kind of warning. There should be few uses of this. jhrg 1/26/26 | ||
| // | ||
| // Based on https://nelkinda.com/blog/suppress-warnings-in-gcc-and-clang/ | ||
|
|
||
| #ifdef __GNUC__ | ||
|
|
||
| #define A_cast_function_type_mismatch \ | ||
| _Pragma("GCC diagnostic push") _Pragma("GCC diagnostic ignored \"-Wcast-function-type-mismatch\"") | ||
|
|
||
| #define A_Pop _Pragma("GCC diagnostic pop") | ||
|
|
||
| #else | ||
| // Define them empty for other compilers (e.g., MSVC) if needed | ||
|
|
||
| #define A_IgnoreUnused | ||
| #define A_Pop | ||
| #endif | ||
|
|
||
| #endif // LIBDAP_DIAGNOSTIC_SUPPRESSION_H |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
I found "A_cast_function_type_mismatch" is defined at diagnostic_supporession.h
as ```
#define A_cast_function_type_mismatch
It is not obvious what it is doing. Could you add a comment to explain what it is doing or point to diagnostic_suppression.h for further reference.
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.
Right. I'll do that.