From ce29d1e9ee6334aa1aca4faeb00208492c46d03a Mon Sep 17 00:00:00 2001 From: Joshua Suskalo Date: Wed, 15 Sep 2021 11:23:12 -0500 Subject: [PATCH] Fix clj-kondo warnings --- src/coffi/ffi.clj | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/src/coffi/ffi.clj b/src/coffi/ffi.clj index 4243c0b..daa05e5 100644 --- a/src/coffi/ffi.clj +++ b/src/coffi/ffi.clj @@ -19,12 +19,16 @@ Any new allocations made during the serialization should be tied to the given `scope`, except in extenuating circumstances." - (fn [type obj segment scope] + (fn + #_{:clj-kondo/ignore [:unused-binding]} + [type obj segment scope] type)) (defmulti deserialize "Deserializes the given object into a Clojure data structure." - (fn [type obj] + (fn + #_{:clj-kondo/ignore [:unused-binding]} + [type obj] type)) (defmulti size-of @@ -32,39 +36,39 @@ (fn [type] type)) (defmethod size-of ::byte - [type] + [_] Byte/SIZE) (defmethod size-of ::short - [type] + [_] Short/SIZE) (defmethod size-of ::integer - [type] + [_] Integer/SIZE) (defmethod size-of ::long - [type] + [_] Long/SIZE) (defmethod size-of ::long-long - [type] + [_] Long/SIZE) (defmethod size-of ::char - [type] + [_] Byte/SIZE) (defmethod size-of ::float - [type] + [_] Float/SIZE) (defmethod size-of ::double - [type] + [_] Double/SIZE) (defmethod size-of ::pointer - [type] + [_] (.byteSize MemoryLayouts/ADDRESS)) (def c-layout