Skip to content

Commit

Permalink
THRIFT-5780 Prevent certain warnings related to net8
Browse files Browse the repository at this point in the history
Client: netstd
Patch: Jens Geyer

This closes #2965
  • Loading branch information
Jens-G committed Apr 24, 2024
1 parent 4a280d5 commit 3dfe0af
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
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

0 comments on commit 3dfe0af

Please sign in to comment.