diff options
author | cherusker <cherusker@users.noreply.github.com> | 2017-06-27 17:21:34 +0300 |
---|---|---|
committer | Bernhard Urban <bernhard.urban@xamarin.com> | 2017-06-27 17:21:34 +0300 |
commit | 4aa28ede12ca06a77c2b3578cc5a9d8a1d7c4bc2 (patch) | |
tree | 36b993df2d99cc07144f564b857daf2467e6a357 /support | |
parent | 67f753a893184932c75b63f2d7cca0cd6323c081 (diff) |
Fix various compiler warnings (#5064)
* Fix compiler warnings (w32)
- add explicit (long long (unsigned)) type casts
- change %ld to %lld once, to match the general style of these logging messages
* Fix compiler warnings (threadpool)
- add explicit (void *) type casts
* Fix compiler warnings (boehm)
- add an explicit (long) type cast; the values are defined as gint64, an upgrade to at least "%ld" seems like a good idea
- about dropping const: const does not seem to be necessary as g_getenv() returns pointers to freshly allocated buffers whenever called. const might have been used to protect the return value of g_getenv() on unix systems with earlier versions of Mono (as a comment in gmisc-unix.c suggests). keeping const here causes a compiler warning, as the const qualifier gets dropped when *env is being used with g_free(). that led to the decision to drop the qualifier altogether.
* Fix compiler warnings (sgen)
- specify the arguments (void) to avoid -Wstrict-prototypes warnings
* Fix compiler warnings (misc - metadata)
- specify the arguments (void) to avoid -Wstrict-prototypes warnings
* Fix compiler warnings (misc)
- specify the arguments (void) to avoid -Wstrict-prototypes warnings
- add an explicit (void *) type cast; changing the return type to char* might be more usable and could be discussed
- ret is not being used and can be removed; fixes a -Wunused-but-set-variable warning
* Fix compiler warnings (mini)
- specify the arguments (void) to avoid -Wstrict-prototypes warnings
* [fixup!] Correct indentation
* [fixup!] Correct (void *)
- use GUINT_TO_POINTER and MONO_NATIVE_THREAD_ID_TO_UINT instead of (void *) to cast mono_native_thread_id_get () to %p
* [fixup!] Correct indentation of boehm-gc.c and add FIXME
* include <inttypes.h> and test the G_GINT64_FORMAT macro
* [fixup!] Use G_G*_FORMAT and PRIx32 macros instead of type casts wherever possible
Diffstat (limited to 'support')
-rw-r--r-- | support/stdlib.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/support/stdlib.c b/support/stdlib.c index 077a85e58f5..5c4c57638c9 100644 --- a/support/stdlib.c +++ b/support/stdlib.c @@ -18,7 +18,7 @@ G_BEGIN_DECLS void* Mono_Unix_VersionString () { - return "MonoProject-2015-12-1"; + return (void *) "MonoProject-2015-12-1"; } gint32 |