From: Ralph Ronnquist Date: Fri, 22 Jul 2022 22:39:04 +0000 (+1000) Subject: added explicit "unused" markers X-Git-Url: https://git.rrq.au/?a=commitdiff_plain;h=6c8c48c0f9dff2154a82f6960d83a706abd523a0;p=rrq%2Frrqmisc.git added explicit "unused" markers --- diff --git a/typing/integeritem.c b/typing/integeritem.c index 221fb70..f557c3f 100644 --- a/typing/integeritem.c +++ b/typing/integeritem.c @@ -10,6 +10,7 @@ * the hashcode index. */ static unsigned long integeritem_hashcode(void *this,void *key) { + (void)this; return (unsigned long) key; } @@ -18,6 +19,7 @@ static unsigned long integeritem_hashcode(void *this,void *key) { * given key or not. */ static int integeritem_haskey(void *this,void *item,void *key) { + (void)this; return item == key; } @@ -26,6 +28,7 @@ static int integeritem_haskey(void *this,void *item,void *key) { * the arity and schema. */ static void *integeritem_itemkey(void *this,void *item) { + (void)this; return item; } @@ -34,6 +37,7 @@ static void *integeritem_itemkey(void *this,void *item) { * callback function to reclaim temporary allocation. */ static void integeritem_releasekey(void *this,void *key) { + (void)this; (void)key; } /** @@ -41,6 +45,7 @@ static void integeritem_releasekey(void *this,void *key) { * a character buffer. */ static int integeritem_tostring(void *this,void *item,char *buffer,int limit) { + (void)this; return snprintf( buffer, limit, "%lld", (long long) item ); } diff --git a/typing/stringitem.c b/typing/stringitem.c index ee8f2cb..d39908b 100644 --- a/typing/stringitem.c +++ b/typing/stringitem.c @@ -12,6 +12,7 @@ * the hashcode index. */ static unsigned long stringitem_hashcode(void *this,void *key) { + (void)this; return HashVector_hashcode( (unsigned char*)key, strlen( (char*)key ) ); } @@ -20,6 +21,7 @@ static unsigned long stringitem_hashcode(void *this,void *key) { * given key or not. */ static int stringitem_haskey(void *this,void *item,void *key) { + (void)this; return strcmp( item, key ) == 0; } @@ -28,6 +30,7 @@ static int stringitem_haskey(void *this,void *item,void *key) { * the arity and schema. */ static void *stringitem_itemkey(void *this,void *item) { + (void)this; return item; } @@ -36,6 +39,7 @@ static void *stringitem_itemkey(void *this,void *item) { * callback function to reclaim temporary allocation. */ static void stringitem_releasekey(void *this,void *key) { + (void)this; (void)key; } /** @@ -43,6 +47,7 @@ static void stringitem_releasekey(void *this,void *key) { * a character buffer. */ static int stringitem_tostring(void *this,void *item,char *buffer,int limit) { + (void)this; if ( item ) { return snprintf( buffer, limit, "\"%s\"", (char*) item ); } diff --git a/vector/HashVector.c b/vector/HashVector.c index 7b68c59..19269c1 100644 --- a/vector/HashVector.c +++ b/vector/HashVector.c @@ -78,6 +78,7 @@ void *HashVector_next(HashVector *hv,VectorIndex *index) { } static int capture_item(Vector *pv,unsigned long ix,void *item,void *data) { + (void)pv; (void)ix; if ( item && item != HV_HOLE ) { HashVector_add( (HashVector *) data, item ); } @@ -85,6 +86,7 @@ static int capture_item(Vector *pv,unsigned long ix,void *item,void *data) { } static int iter_item(unsigned long ix,void *item,void *data) { + (void)ix; if ( item && item != HV_HOLE ) { HashVector_add( (HashVector *) data, item ); }