summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLeo Tenenbaum <pommicket@gmail.com>2020-03-13 18:13:33 -0400
committerLeo Tenenbaum <pommicket@gmail.com>2020-03-13 18:13:33 -0400
commit78daa3fc749f68135d1364df938c63aa9a9cbcb3 (patch)
tree4e072b7b7a6a594ab7bf89a9050508ff021e0c64
parenta6f615edde21c3be638d9588c6c9a98cfe0bb5d9 (diff)
silenced some compiler warnings about avcall
-rw-r--r--foreign.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/foreign.c b/foreign.c
index 38758e9..647a182 100644
--- a/foreign.c
+++ b/foreign.c
@@ -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) {