From: Mark Lodato Date: Sun, 28 Feb 2010 20:15:40 GMT Subject: Re: [PATCH 4/5] grep: Colorize filename, line number, and separator Message-ID: In-Reply-To: <7vy6ie1u9a.fsf@alter.siamese.dyndns.org> On Sat, Feb 27, 2010 at 12:08 PM, Junio C Hamano wrote: > René Scharfe 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?