Skip to content

Commit

Permalink
Fixed various clang -Wself-assign warnings
Browse files Browse the repository at this point in the history
Use idiomatic cast to void to indicate that a variable is unused.
  • Loading branch information
seanm committed Nov 16, 2024
1 parent e188eb9 commit f907cd3
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions libdispatch/ncexhash.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down
2 changes: 1 addition & 1 deletion libdispatch/ncjson.c
Original file line number Diff line number Diff line change
Expand Up @@ -1140,5 +1140,5 @@ netcdf_supresswarnings(void)
ignore = (void*)NCJtotext;
ignore = (void*)NCJinsertstring;
ignore = (void*)NCJinsertint;
ignore = ignore;
(void)ignore;
}
2 changes: 1 addition & 1 deletion libnczarr/zplugins.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit f907cd3

Please sign in to comment.