Some warning fixage.

* glib/GType.cs:
* glib/Makefile.am:
* glib/Object.cs:
* glib/ParamSpec.cs:
* glib/PtrArray.cs:
* glib/SignalClosure.cs:
* glib/Value.cs:
mark private struct fields public to avoid 0169, and remove the nowarn
from the csc command.  fixed one real warning, exposed a bunch of
obsolete usage still to fix.
This commit is contained in:
Mike Kestner 2011-03-23 14:05:01 -05:00
parent d1b852bdf3
commit a56feb01e3
7 changed files with 47 additions and 48 deletions

View file

@ -38,15 +38,15 @@ namespace GLib {
struct GTypeInfo { struct GTypeInfo {
public ushort class_size; public ushort class_size;
IntPtr base_init; public IntPtr base_init;
IntPtr base_finalize; public IntPtr base_finalize;
IntPtr class_init; public IntPtr class_init;
IntPtr class_finalize; public IntPtr class_finalize;
IntPtr class_data; public IntPtr class_data;
public ushort instance_size; public ushort instance_size;
ushort n_preallocs; public ushort n_preallocs;
IntPtr instance_init; public IntPtr instance_init;
IntPtr value_table; public IntPtr value_table;
} }
struct GTypeQuery { struct GTypeQuery {

View file

@ -81,7 +81,7 @@ EXTRA_DIST = \
$(ASSEMBLY): $(build_sources) $(SNK) $(ASSEMBLY): $(build_sources) $(SNK)
@rm -f $(ASSEMBLY).mdb @rm -f $(ASSEMBLY).mdb
$(CSC) $(CSFLAGS) -keyfile:$(SNK) -unsafe -nowarn:0169,0612,0618 -out:$(ASSEMBLY) -target:library $(references) $(build_sources) $(CSC) $(CSFLAGS) -keyfile:$(SNK) -unsafe -out:$(ASSEMBLY) -target:library $(references) $(build_sources)
policy.%.config: $(top_builddir)/policy.config policy.%.config: $(top_builddir)/policy.config
sed -e "s/@ASSEMBLY_NAME@/$(ASSEMBLY_NAME)/" -e "s/@POLICY@/$*/" $(top_builddir)/policy.config > $@ sed -e "s/@ASSEMBLY_NAME@/$(ASSEMBLY_NAME)/" -e "s/@POLICY@/$*/" $(top_builddir)/policy.config > $@

View file

@ -180,23 +180,23 @@ namespace GLib {
} }
struct GObjectClass { struct GObjectClass {
GTypeClass type_class; public GTypeClass type_class;
IntPtr construct_props; public IntPtr construct_props;
public ConstructorDelegate constructor_cb; public ConstructorDelegate constructor_cb;
public SetPropertyDelegate set_prop_cb; public SetPropertyDelegate set_prop_cb;
public GetPropertyDelegate get_prop_cb; public GetPropertyDelegate get_prop_cb;
IntPtr dispose; public IntPtr dispose;
IntPtr finalize; public IntPtr finalize;
IntPtr dispatch_properties_changed; public IntPtr dispatch_properties_changed;
IntPtr notify; public IntPtr notify;
IntPtr constructed; public IntPtr constructed;
IntPtr dummy1; public IntPtr dummy1;
IntPtr dummy2; public IntPtr dummy2;
IntPtr dummy3; public IntPtr dummy3;
IntPtr dummy4; public IntPtr dummy4;
IntPtr dummy5; public IntPtr dummy5;
IntPtr dummy6; public IntPtr dummy6;
IntPtr dummy7; public IntPtr dummy7;
} }
[UnmanagedFunctionPointer (CallingConvention.Cdecl)] [UnmanagedFunctionPointer (CallingConvention.Cdecl)]

View file

@ -109,22 +109,22 @@ namespace GLib {
} }
struct GTypeInstance { struct GTypeInstance {
IntPtr g_class; public IntPtr g_class;
} }
struct GParamSpec { struct GParamSpec {
GTypeInstance g_type_instance; public GTypeInstance g_type_instance;
IntPtr name; public IntPtr name;
ParamFlags flags; public ParamFlags flags;
public IntPtr value_type; public IntPtr value_type;
IntPtr owner_type; public IntPtr owner_type;
IntPtr _nick; public IntPtr _nick;
IntPtr _blurb; public IntPtr _blurb;
IntPtr qdata; public IntPtr qdata;
uint ref_count; public uint ref_count;
uint param_id; public uint param_id;
} }
[DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] [DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]

View file

@ -145,7 +145,7 @@ namespace GLib {
} }
struct GPtrArray { struct GPtrArray {
IntPtr pdata; public IntPtr pdata;
public uint len; public uint len;
} }

View file

@ -29,7 +29,6 @@ namespace GLib {
EventArgs args; EventArgs args;
GLib.Object obj; GLib.Object obj;
object result;
public ClosureInvokedArgs (GLib.Object obj, EventArgs args) public ClosureInvokedArgs (GLib.Object obj, EventArgs args)
{ {
@ -51,10 +50,10 @@ namespace GLib {
} }
struct GClosure { struct GClosure {
long fields; public long fields;
IntPtr marshaler; public IntPtr marshaler;
IntPtr data; public IntPtr data;
IntPtr notifiers; public IntPtr notifiers;
} }
internal delegate void ClosureInvokedHandler (object o, ClosureInvokedArgs args); internal delegate void ClosureInvokedHandler (object o, ClosureInvokedArgs args);

View file

@ -32,15 +32,15 @@ namespace GLib {
[StructLayout(LayoutKind.Explicit)] [StructLayout(LayoutKind.Explicit)]
struct Padding { struct Padding {
[FieldOffset (0)] int v_int; [FieldOffset (0)] public int v_int;
[FieldOffset (0)] uint v_uint; [FieldOffset (0)] public uint v_uint;
[FieldOffset (0)] int v_long; [FieldOffset (0)] public int v_long;
[FieldOffset (0)] uint v_ulong; [FieldOffset (0)] public uint v_ulong;
[FieldOffset (0)] long v_int64; [FieldOffset (0)] public long v_int64;
[FieldOffset (0)] ulong v_uint64; [FieldOffset (0)] public ulong v_uint64;
[FieldOffset (0)] float v_float; [FieldOffset (0)] public float v_float;
[FieldOffset (0)] double v_double; [FieldOffset (0)] public double v_double;
[FieldOffset (0)] IntPtr v_pointer; [FieldOffset (0)] public IntPtr v_pointer;
} }
IntPtr type; IntPtr type;