Repository: lucy-clownfish Updated Branches: refs/heads/0.5 05d3caa62 -> c83c71364
Fix compiler warnings Project: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/repo Commit: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/commit/4aec071f Tree: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/tree/4aec071f Diff: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/diff/4aec071f Branch: refs/heads/0.5 Commit: 4aec071f0616e140d4377e78fbe16ab06cc773de Parents: 05d3caa Author: Nick Wellnhofer <wellnho...@aevum.de> Authored: Sat Mar 12 15:39:53 2016 +0100 Committer: Nick Wellnhofer <wellnho...@aevum.de> Committed: Sat Mar 12 15:42:33 2016 +0100 ---------------------------------------------------------------------- compiler/common/charmonizer.c | 3 ++- compiler/common/charmonizer.main | 3 ++- compiler/modules/CommonMark/src/config.h | 5 ++++- compiler/src/CFCCallable.c | 6 ------ compiler/src/CFCPython.c | 7 +++++++ 5 files changed, 15 insertions(+), 9 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/4aec071f/compiler/common/charmonizer.c ---------------------------------------------------------------------- diff --git a/compiler/common/charmonizer.c b/compiler/common/charmonizer.c index 887e57c..87c80d0 100644 --- a/compiler/common/charmonizer.c +++ b/compiler/common/charmonizer.c @@ -7998,7 +7998,8 @@ S_add_compiler_flags(struct chaz_CLI *cli) { } chaz_CFlags_append(extra_cflags, - "-pedantic -Wall -Wextra -Wno-variadic-macros"); + "-pedantic -Wall -Wextra -Wno-variadic-macros" + " -Wno-overlength-strings"); if (strcmp(chaz_CLI_strval(cli, "host"), "perl") == 0) { chaz_CFlags_append(extra_cflags, "-DPERL_GCC_PEDANTIC"); } http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/4aec071f/compiler/common/charmonizer.main ---------------------------------------------------------------------- diff --git a/compiler/common/charmonizer.main b/compiler/common/charmonizer.main index e8058c6..80f161a 100644 --- a/compiler/common/charmonizer.main +++ b/compiler/common/charmonizer.main @@ -103,7 +103,8 @@ S_add_compiler_flags(struct chaz_CLI *cli) { } chaz_CFlags_append(extra_cflags, - "-pedantic -Wall -Wextra -Wno-variadic-macros"); + "-pedantic -Wall -Wextra -Wno-variadic-macros" + " -Wno-overlength-strings"); if (strcmp(chaz_CLI_strval(cli, "host"), "perl") == 0) { chaz_CFlags_append(extra_cflags, "-DPERL_GCC_PEDANTIC"); } http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/4aec071f/compiler/modules/CommonMark/src/config.h ---------------------------------------------------------------------- diff --git a/compiler/modules/CommonMark/src/config.h b/compiler/modules/CommonMark/src/config.h index e387e69..97272b2 100644 --- a/compiler/modules/CommonMark/src/config.h +++ b/compiler/modules/CommonMark/src/config.h @@ -18,4 +18,7 @@ typedef char bool; #define HAVE_C99_SNPRINTF #endif -#define inline CHY_INLINE +#if defined(_MSC_VER) && !defined(__cplusplus) + #define inline __inline +#endif + http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/4aec071f/compiler/src/CFCCallable.c ---------------------------------------------------------------------- diff --git a/compiler/src/CFCCallable.c b/compiler/src/CFCCallable.c index d421366..ccb3931 100644 --- a/compiler/src/CFCCallable.c +++ b/compiler/src/CFCCallable.c @@ -31,12 +31,6 @@ #include "CFCDocuComment.h" #include "CFCUtil.h" -static const CFCMeta CFCCALLABLE_META = { - "Clownfish::CFC::Model::Callable", - sizeof(CFCCallable), - (CFCBase_destroy_t)CFCCallable_destroy -}; - CFCCallable* CFCCallable_init(CFCCallable *self, const char *exposure, const char *name, CFCType *return_type, CFCParamList *param_list, http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/4aec071f/compiler/src/CFCPython.c ---------------------------------------------------------------------- diff --git a/compiler/src/CFCPython.c b/compiler/src/CFCPython.c index d108b69..3c60682 100644 --- a/compiler/src/CFCPython.c +++ b/compiler/src/CFCPython.c @@ -112,6 +112,8 @@ S_write_hostdefs(CFCPython *self) { static char* S_gen_callbacks(CFCPython *self, CFCParcel *parcel, CFCClass **ordered) { + CHY_UNUSED_VAR(self); + CHY_UNUSED_VAR(parcel); char *callbacks = CFCUtil_strdup(""); // Generate implementation files containing callback definitions. @@ -364,6 +366,8 @@ S_gen_callbacks(CFCPython *self, CFCParcel *parcel, CFCClass **ordered) { static char* S_gen_type_linkups(CFCPython *self, CFCParcel *parcel, CFCClass **ordered) { + CHY_UNUSED_VAR(self); + CHY_UNUSED_VAR(parcel); char *handles = CFCUtil_strdup(""); char *py_types = CFCUtil_strdup(""); int num_items = 0; @@ -413,6 +417,9 @@ S_gen_type_linkups(CFCPython *self, CFCParcel *parcel, CFCClass **ordered) { static char* S_gen_class_bindings(CFCPython *self, CFCParcel *parcel, const char *pymod_name, CFCClass **ordered) { + CHY_UNUSED_VAR(self); + CHY_UNUSED_VAR(parcel); + CHY_UNUSED_VAR(pymod_name); char *bindings = CFCUtil_strdup(""); for (size_t i = 0; ordered[i] != NULL; i++) { CFCClass *klass = ordered[i];