Fix more warnings. (#11853)
commitad6de27b9087b6b520a95db1c178c0c98c84ae79
authorJay Krell <jay.krell@cornell.edu>
Wed, 5 Dec 2018 00:18:02 +0000 (4 16:18 -0800)
committerGitHub <noreply@github.com>
Wed, 5 Dec 2018 00:18:02 +0000 (4 16:18 -0800)
treed69aecdbd084d60dee1e4e9b006d6ddf61f9d1ae
parentdd58c519e40354eb3efb3ca0ceb2512bc35054f3
Fix more warnings. (#11853)

This isn't correct for Win64 but that should be ok.
It is correct for all other platforms.

/s/mono/mono/sgen/sgen-memory-governor.c:309:5: warning: format specifies type 'ssize_t' (aka 'long') but the argument has type 'unsigned int' [-Wformat]
                                entry->promoted_size / 1024,
                                ^~~~~~~~~~~~~~~~~~~~~~~~~~~
/s/mono/mono/sgen/sgen-memory-governor.c:310:5: warning: format specifies type 'ssize_t' (aka 'long') but the argument has type 'unsigned int' [-Wformat]
                                entry->major_size / 1024,
                                ^~~~~~~~~~~~~~~~~~~~~~~~
/s/mono/mono/sgen/sgen-memory-governor.c:311:5: warning: format specifies type 'ssize_t' (aka 'long') but the argument has type 'unsigned int' [-Wformat]
                                entry->major_size_in_use / 1024,
                                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/s/mono/mono/sgen/sgen-memory-governor.c:312:5: warning: format specifies type 'ssize_t' (aka 'long') but the argument has type 'unsigned int' [-Wformat]
                                entry->los_size / 1024,
                                ^~~~~~~~~~~~~~~~~~~~~~
/s/mono/mono/sgen/sgen-memory-governor.c:313:5: warning: format specifies type 'ssize_t' (aka 'long') but the argument has type 'unsigned int' [-Wformat]
                                entry->los_size_in_use / 1024);
                                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/s/mono/mono/sgen/sgen-memory-governor.c:321:5: warning: format specifies type 'ssize_t' (aka 'long') but the argument has type 'unsigned int' [-Wformat]
                                entry->los_size / 1024,
                                ^~~~~~~~~~~~~~~~~~~~~~
/s/mono/mono/sgen/sgen-memory-governor.c:322:5: warning: format specifies type 'ssize_t' (aka 'long') but the argument has type 'unsigned int' [-Wformat]
                                entry->los_size_in_use / 1024);
                                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/s/mono/mono/sgen/sgen-memory-governor.c:332:5: warning: format specifies type 'ssize_t' (aka 'long') but the argument has type 'unsigned int' [-Wformat]
                                entry->los_size / 1024,
                                ^~~~~~~~~~~~~~~~~~~~~~
/s/mono/mono/sgen/sgen-memory-governor.c:333:5: warning: format specifies type 'ssize_t' (aka 'long') but the argument has type 'unsigned int' [-Wformat]
                                entry->los_size_in_use / 1024);
                                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/s/mono/mono/sgen/sgen-memory-governor.c:337:5: warning: format specifies type 'ssize_t' (aka 'long') but the argument has type 'unsigned int' [-Wformat]
                                entry->major_size / 1024,
                                ^~~~~~~~~~~~~~~~~~~~~~~~
/s/mono/mono/sgen/sgen-memory-governor.c:338:5: warning: format specifies type 'ssize_t' (aka 'long') but the argument has type 'unsigned int' [-Wformat]
                                entry->major_size_in_use / 1024);
                                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

/s/mono/mono/metadata/w32file-unix.c:4688:1: warning: no previous prototype for function 'ves_icall_System_IO_DriveInfo_GetDriveType' [-Wmissing-prototypes]
ves_icall_System_IO_DriveInfo_GetDriveType (const gunichar2 *root_path_name, gint32 root_path_name_length, MonoError *error)
^

/s/mono/mono/metadata/remoting.c:2143:1: warning: no previous prototype for function 'mono_context_set_icall' [-Wmissing-prototypes]
mono_context_set_icall (MonoAppContext *new_context_raw)
^

/s/mono/mono/mini/mini-posix.c:229:2: warning: unused variable 'ctx' [-Wunused-variable]
        MONO_SIG_HANDLER_GET_CONTEXT;

And beware icall-decl.h + Boehm producing:
w32file-unix.c:4905:16: error: implicit declaration of function 'GC_dlopen' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
        libc_handle = dlopen ("/usr/lib/libc.dylib", 0);
                      ^
or, if you fix that, unreferenced symbol _GC_dlopen.
libgc/include/gc_pthread_redirects.h
mono/metadata/remoting.c
mono/metadata/w32file-unix.c
mono/mini/mini-posix.c
mono/sgen/sgen-memory-governor.c