diff options
author | Jay Krell <jay.krell@cornell.edu> | 2018-12-05 03:18:02 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-12-05 03:18:02 +0300 |
commit | ad6de27b9087b6b520a95db1c178c0c98c84ae79 (patch) | |
tree | d69aecdbd084d60dee1e4e9b006d6ddf61f9d1ae /libgc | |
parent | dd58c519e40354eb3efb3ca0ceb2512bc35054f3 (diff) |
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.
Diffstat (limited to 'libgc')
-rw-r--r-- | libgc/include/gc_pthread_redirects.h | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/libgc/include/gc_pthread_redirects.h b/libgc/include/gc_pthread_redirects.h index 982d93403e6..bd46f720acf 100644 --- a/libgc/include/gc_pthread_redirects.h +++ b/libgc/include/gc_pthread_redirects.h @@ -5,6 +5,14 @@ #define GC_PTHREAD_REDIRECTS_H +#ifdef __cplusplus +extern "C" { +#endif + void * GC_dlopen(const char *path, int mode); +#ifdef __cplusplus +} // extern "C" +#endif + #if defined(GC_SOLARIS_THREADS) /* We need to intercept calls to many of the threads primitives, so */ /* that we can locate thread stacks and stop the world. */ @@ -26,7 +34,6 @@ extern "C" { int GC_thr_join(thread_t wait_for, thread_t *departed, void **status); int GC_thr_suspend(thread_t target_thread); int GC_thr_continue(thread_t target_thread); - void * GC_dlopen(const char *path, int mode); # define thr_create GC_thr_create # define thr_join GC_thr_join # define thr_suspend GC_thr_suspend @@ -66,7 +73,6 @@ extern "C" { # define dlopen GC_dlopen #endif /* SOLARIS_THREADS || SOLARIS_PTHREADS */ - #if !defined(GC_USE_LD_WRAP) && (defined(GC_PTHREADS) || defined(GC_DARWIN_THREADS) || defined(GC_MACOSX_THREADS)) && !defined(GC_SOLARIS_PTHREADS) /* We treat these similarly. */ # include <pthread.h> |