git/list[1] front-page[2] threads[3] people[4] search[5] about
 

unused variable in hashmap.h [was: Re: [PATCH] Fixed pervasive enumeration warning in convert.h.]

From
René Scharfe <l.s.r@web.de>
Date
Jan 13, 2018, 17:13 UTC
Message-ID
<f139ed79-1e12-d7b6-dd24-ce77000917ec@web.de>
In-Reply-To
<004c01d38bde$f0e6bb50$d2b431f0$@nexbridge.com>
Am 12.01.2018 um 20:52 schrieb Randall S. Becker:
> On a related too many warnings subject, hashmap.h has a variable
> unused (void *item). Is that addressed soon? If not, I can deal with
> it.
Here are the code lines containing the variable in question:
        void *item;
        while ((item = hashmap_iter_next(&iter)))

Intriguing. The variable "item" is set, but can be removed without effect. GCC 7.2 and Clang 5 don't warn about that.

The code was introduced by 8b604d1951 (hashmap: add API to disable item counting when threaded) and there is no patch in pu that touches it again, yet.

René
Previous: Randall S. BeckerNext: Randall S. Becker
Message 4 of 6 in “Fixed pervasive enumeration warning in convert.h.”
  1. Fixed pervasive enumeration warning in convert.h.randall.s.becker@rogers.com, Jan 12, 2018
  2. Junio C HamanoJan 12, 2018
  3. Randall S. BeckerJan 12, 2018
  4. unused variable in hashmap.h [was: Re: [PATCH] Fixed pervasive enumeration warning in convert.h.]René Scharfe, Jan 13, 2018
  5. Randall S. BeckerJan 13, 2018
  6. 1/1 convert_to_git(): safe_crlf/checksafe becomes int conv_flagstboegi@web.de, Jan 13, 2018

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.