From: Duy Nguyen Date: Mon, 22 Feb 2016 09:32:55 GMT Subject: Re: [PATCH] GSoC Micoproject: Hunt down signed int flags Message-ID: In-Reply-To: <1456053189-5221-1-git-send-email-sauravsachidanand@gmail.com> On Sun, Feb 21, 2016 at 6:13 PM, Saurav Sachidanand 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