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

THRIFT-5780 Prevent certain warnings related to net8 #2965

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 2 additions & 0 deletions compiler/cpp/src/thrift/generate/t_netstd_generator.cc
Expand Up @@ -2019,6 +2019,8 @@ void t_netstd_generator::generate_deprecation_attribute(ostream& out, t_function
// empty annotation values end up with "1" somewhere, ignore these as well
if ((iter->second.back().length() > 0) && (iter->second.back() != "1")) {
out << "(" << make_csharp_string_literal(iter->second.back()) << ")";
} else {
out << "(" << make_csharp_string_literal("This code is deprecated.") << ")"; // generic message to prevent CA1041
}
out << "]" << '\n';
}
Expand Down
2 changes: 2 additions & 0 deletions lib/netstd/Thrift/Transport/Client/THttpTransport.cs
Expand Up @@ -25,6 +25,8 @@
using System.Threading;
using System.Threading.Tasks;

#pragma warning disable IDE0079 // unneeded suppression -> all except net8
#pragma warning disable IDE0301 // simplify collection init -> net8 only

namespace Thrift.Transport.Client
{
Expand Down