From a03ee5efee746bfd60689fa28da759aabe14ba06 Mon Sep 17 00:00:00 2001 From: Natalia Portillo Date: Thu, 5 Oct 2023 01:05:21 +0100 Subject: [PATCH] Annotate or remove unused elements. --- BigEndianBitConverter.cs | 3 +++ Marshal.cs | 2 ++ StringHandlers.cs | 2 ++ Swapping.cs | 2 ++ 4 files changed, 9 insertions(+) diff --git a/BigEndianBitConverter.cs b/BigEndianBitConverter.cs index dcadf37..cb1225b 100644 --- a/BigEndianBitConverter.cs +++ b/BigEndianBitConverter.cs @@ -31,6 +31,7 @@ // ****************************************************************************/ using System; +using System.Diagnostics.CodeAnalysis; using System.Linq; namespace Aaru.Helpers; @@ -39,6 +40,8 @@ namespace Aaru.Helpers; /// Converts base data types to an array of bytes, and an array of bytes to base data types. All info taken from /// the meta data of System.BitConverter. This implementation allows for Endianness consideration. /// +[SuppressMessage("ReSharper", "UnusedParameter.Global")] +[SuppressMessage("ReSharper", "UnusedMember.Global")] public static class BigEndianBitConverter { /// Converts the specified double-precision floating point number to a 64-bit signed integer. diff --git a/Marshal.cs b/Marshal.cs index 7791e23..738c75f 100644 --- a/Marshal.cs +++ b/Marshal.cs @@ -39,6 +39,8 @@ using System.Runtime.InteropServices; namespace Aaru.Helpers; /// Provides methods to marshal binary data into C# structs +[SuppressMessage("ReSharper", "MemberCanBePrivate.Global")] +[SuppressMessage("ReSharper", "UnusedMember.Global")] public static class Marshal { /// Returns the size of an unmanaged type in bytes. diff --git a/StringHandlers.cs b/StringHandlers.cs index aa9bc4c..0734863 100644 --- a/StringHandlers.cs +++ b/StringHandlers.cs @@ -31,11 +31,13 @@ // ****************************************************************************/ using System; +using System.Diagnostics.CodeAnalysis; using System.Text; namespace Aaru.Helpers; /// Helper operations to work with strings +[SuppressMessage("ReSharper", "UnusedMember.Global")] public static class StringHandlers { /// Converts a null-terminated (aka C string) ASCII byte array to a C# string diff --git a/Swapping.cs b/Swapping.cs index cc80e97..e5f3b64 100644 --- a/Swapping.cs +++ b/Swapping.cs @@ -30,11 +30,13 @@ // Copyright © 2011-2023 Natalia Portillo // ****************************************************************************/ +using System.Diagnostics.CodeAnalysis; using System.Runtime.CompilerServices; namespace Aaru.Helpers; /// Helper operations to work with swapping endians +[SuppressMessage("ReSharper", "UnusedMember.Global")] public static class Swapping { /// Gets the PDP endian equivalent of the given little endian unsigned integer