Fixed various clang -Wself-assign warnings

Use idiomatic cast to void to indicate that a variable is unused.
This commit is contained in:
Sean McBride 2024-11-15 23:46:47 -05:00
parent e188eb95d2
commit f907cd3b57
3 changed files with 4 additions and 2 deletions

View File

@ -285,6 +285,8 @@ exhashlocate(NCexhashmap* map, ncexhashkey_t hkey, NCexleaf** leafp, int* indexp
/* Is there room in the leaf to add an entry? */
#if DEBUG >= 3
fprintf(stderr,"locate: iter=%d offset=%x leaf=(%d)%p active=%d\n",iter,offset,leaf->uid,leaf,(int)leaf->active);
#else
(void)iter;
#endif
if(leaf->active < map->leaflen) break; /* yes, there is room */
/* Not Enough room, so we need to split this leaf */

View File

@ -1140,5 +1140,5 @@ netcdf_supresswarnings(void)
ignore = (void*)NCJtotext;
ignore = (void*)NCJinsertstring;
ignore = (void*)NCJinsertint;
ignore = ignore;
(void)ignore;
}

View File

@ -759,7 +759,7 @@ printhdf5(const NCZ_HDF5 h)
static void static_unused(void)
{
void* p = NULL;
p = p;
(void)p;
p = static_unused;
#if defined(DEBUGF) || defined(DEBUGL)
(void)printplugin(NULL);