diff options
author | Leo Tenenbaum <pommicket@gmail.com> | 2020-03-13 18:13:33 -0400 |
---|---|---|
committer | Leo Tenenbaum <pommicket@gmail.com> | 2020-03-13 18:13:33 -0400 |
commit | 78daa3fc749f68135d1364df938c63aa9a9cbcb3 (patch) | |
tree | 4e072b7b7a6a594ab7bf89a9050508ff021e0c64 | |
parent | a6f615edde21c3be638d9588c6c9a98cfe0bb5d9 (diff) |
silenced some compiler warnings about avcall
-rw-r--r-- | foreign.c | 15 |
1 files changed, 7 insertions, 8 deletions
@@ -11,6 +11,9 @@ #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wsign-conversion" +#elif defined __GNUC__ +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wsign-conversion" #endif #include <avcall.h> #include <dlfcn.h> @@ -179,17 +182,11 @@ static bool arg_list_start(av_alist *arg_list, void (*fn)(), Value *return_val, } } } - _av_start_struct(*arg_list, fn, struct_size, splittable, return_val->struc); + /* getting warning on Debian stretch about splittable being set but not used */ + _av_start_struct(*arg_list, fn, struct_size, splittable, return_val->struc); (void)splittable; } break; case TYPE_SLICE: -#if defined(__GNUC__) && !defined(__clang__) -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wsign-conversion" -#endif av_start_struct(*arg_list, fn, Slice, av_word_splittable_2(I64, void *), &return_val->slice); -#if defined(__GNUC__) && !defined(__clang__) -#pragma GCC diagnostic pop -#endif break; case TYPE_EXPR: assert(0); @@ -282,6 +279,8 @@ static bool arg_list_add(av_alist *arg_list, Value val, Type *type, Location whe #ifdef __clang__ #pragma clang diagnostic pop +#elif defined __GNUC__ +#pragma GCC diagnostic pop #endif static void ffmgr_create(ForeignFnManager *ffmgr, Allocator *allocr) { |