From 00fdbb340f3d21f0bcd67a4b6b24c04f9a77d474 Mon Sep 17 00:00:00 2001 From: Vitor Sousa Date: Thu, 7 Mar 2019 17:03:52 -0300 Subject: [PATCH] efl_csharp: remove warnings caused by unused or unnecessary code Reviewers: lauromoura, segfaultxavi, cedric Reviewed By: lauromoura Subscribers: #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D8234 --- src/bin/eolian_mono/eolian/mono/klass.hh | 5 ++--- src/bindings/mono/eina_mono/eina_inarray.cs | 1 - src/bindings/mono/eo_mono/FunctionWrapper.cs | 2 ++ 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/bin/eolian_mono/eolian/mono/klass.hh b/src/bin/eolian_mono/eolian/mono/klass.hh index 199dd8c321..0689648779 100644 --- a/src/bin/eolian_mono/eolian/mono/klass.hh +++ b/src/bin/eolian_mono/eolian/mono/klass.hh @@ -349,7 +349,7 @@ struct klass // Copied from nativeinherit class, used when setting up providers. if(!as_generator( - scope_tab << "private static " << (root ? "" : "new ") << " IntPtr GetEflClassStatic()\n" + scope_tab << "private static IntPtr GetEflClassStatic()\n" << scope_tab << "{\n" << scope_tab << scope_tab << "return " << name_helpers::klass_get_full_name(cls) << "();\n" << scope_tab << "}\n" @@ -481,8 +481,7 @@ struct klass if (is_inherit) { if (!as_generator( - scope_tab << "private static readonly object klassAllocLock = new object();\n" - << scope_tab << "protected bool inherited;\n" + scope_tab << "protected bool inherited;\n" ).generate(sink, attributes::unused, context)) return false; } diff --git a/src/bindings/mono/eina_mono/eina_inarray.cs b/src/bindings/mono/eina_mono/eina_inarray.cs index 47a1336b98..a99acc8371 100644 --- a/src/bindings/mono/eina_mono/eina_inarray.cs +++ b/src/bindings/mono/eina_mono/eina_inarray.cs @@ -226,7 +226,6 @@ public class Inarray : IEnumerable, IDisposable public T Nth(uint idx) { IntPtr ele = eina_inarray_nth(Handle, idx); - IntPtr v = Marshal.ReadIntPtr(ele); return NativeToManagedInplace(ele); } diff --git a/src/bindings/mono/eo_mono/FunctionWrapper.cs b/src/bindings/mono/eo_mono/FunctionWrapper.cs index 448403a899..03e81383bb 100644 --- a/src/bindings/mono/eo_mono/FunctionWrapper.cs +++ b/src/bindings/mono/eo_mono/FunctionWrapper.cs @@ -25,7 +25,9 @@ public partial class FunctionInterop public class FunctionWrapper { private Lazy> loadResult; +#pragma warning disable 0414 private NativeModule module; // so it doesn't get unloaded +#pragma warning restore 0414 private static FunctionLoadResult LazyInitialization(NativeModule module, string functionName) {