Re: [PATCH 4/5] grep: Colorize filename, line number, and separator

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, Feb 27, 2010 at 12:08 PM, Junio C Hamano <gitster@xxxxxxxxx> wrote:
> René Scharfe <rene.scharfe@xxxxxxxxxxxxxx> writes:
>
>>> -                    opt->output(opt, bol + match.rm_so,
>>> -                                (int)(match.rm_eo - match.rm_so));
>>
>> The third parameter of output_color() (and of ->output(), so you didn't
>> introduce this, of course) is a size_t, so why cast to int?  Is a cast
>> needed at all?
>
> I don't think so.
>
> Earlier in 747a322 (grep: cast printf %.*s "precision" argument explicitly
> to int, 2009-03-08), I casted the difference between two regoff_t you were
> feeding to printf's "%.*s" as a length, introduced by 7e8f59d (grep: color
> patterns in output, 2009-03-07), and 5b594f4 (Threaded grep, 2010-01-25)
> carried that cast over without thinking.

Ok.  I'll remove the cast.  Should I note this in the commit message?
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]