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

Re: [PATCH] GSoC Micoproject: Hunt down signed int flags

From
Duy Nguyen <pclouds@gmail.com>
Date
Feb 22, 2016, 09:32 UTC
Message-ID
<CACsJy8CbGY2BNF=VYtJFReVTycae18bdkqRhmVQi76COvm5f0w@mail.gmail.com>
In-Reply-To
<1456053189-5221-1-git-send-email-sauravsachidanand@gmail.com>

On Sun, Feb 21, 2016 at 6:13 PM, Saurav Sachidanand <sauravsachidanand@gmail.com> wrote:

> This is patch is for a suggested micro project for GSoC 2016; namely,
> that of searching for a field of a struct that is of signed integral
> type and used as a collection of multiple bits, and converting it to
> an unsigned type if the MSB isn’t used in any special way.

if you use gcc, you can try to build git with -Wsign-conversion (i.e. "make CFLAGS=-Wsign-conversion") with and without your patch then see if there are any new warnings. I only checked dir.c and attr.c, there were 4 new warnings. From a quick look, I think gcc was correct, you just need to convert some more "int" to unsigned int" to prevent implicit conversion.

-- 
Duy
Previous: Eric Sunshine
Message 4 of 4 in “GSoC Micoproject: Hunt down signed int flags”
  1. GSoC Micoproject: Hunt down signed int flagsSaurav Sachidanand, Feb 21, 2016
  2. Moritz NeebFeb 21, 2016
  3. Eric SunshineFeb 22, 2016
  4. Duy NguyenFeb 22, 2016

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.