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

Re: [PATCH] read_cache: cast types from stat to ce_cache

From
Michael J Gruber <git@drmicha.warpmail.net>
Date
Jun 11, 2010, 13:32 UTC
Message-ID
<4C123AD4.6070606@drmicha.warpmail.net>
In-Reply-To
<7vmxv2nar5.fsf@alter.siamese.dyndns.org>
Junio C Hamano venit, vidit, dixit 10.06.2010 17:54:
Show 15 quoted lines
> Michael J Gruber <git@drmicha.warpmail.net> writes:
> 
>> -	ce->ce_dev = st->st_dev;
>> -	ce->ce_ino = st->st_ino;
>> -	ce->ce_uid = st->st_uid;
>> -	ce->ce_gid = st->st_gid;
>> -	ce->ce_size = st->st_size;
>> +	ce->ce_dev = (unsigned int)st->st_dev;
>> +	ce->ce_ino = (unsigned int)st->st_ino;
>> +	ce->ce_uid = (unsigned int)st->st_uid;
>> +	ce->ce_gid = (unsigned int)st->st_gid;
>> +	ce->ce_size = (unsigned int)st->st_size;
> 
> I haven't had my morning coffee yet, but wouldn't the conversion be
> automatic by assignment anyway?

Well, we do cast from dev_t etc. to unsigned int in all other places in read_cache.c.

In any case, enjoy your coffee :)
Michael
Previous: Junio C HamanoNext: Erik Faye-Lund
Message 3 of 5 in “read_cache: cast types from stat to ce_cache”
  1. read_cache: cast types from stat to ce_cacheMichael J Gruber, Jun 10, 2010
  2. Junio C HamanoJun 10, 2010
  3. Michael J GruberJun 11, 2010
  4. Erik Faye-LundJun 11, 2010
  5. Michael J GruberJun 11, 2010

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.