Re: [RFC/PATCH] Add --exclude-dir option to git grep

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

 



David Ripton <dripton@xxxxxxxxxx> writes:

>>> +static int exclude_dir_callback(const struct option *opt, const char *arg,
>>> +				int unset)
>>> +{
>>> +	struct string_list *exclude_dir_list = opt->value;
>>> +	char *s1 = (char *)arg;
>>
>> What is this cast for?
>
> It avoids:
>
> "builtin/grep.c:893: warning: initialization discards qualifiers from
> pointer target type"

And the reason why s1 cannot be of type "const char *" is...?
--
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]