mirror of
https://github.com/git/git.git
synced 2024-05-13 08:46:09 +02:00
string-list: mark unused callback parameters
String-lists may be used with callbacks for clearing or iteration. These callbacks need to conform to a particular interface, even though not every callback needs all of its parameters. Mark the unused ones to make -Wunused-parameter happy. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
parent
9eb6cdadd1
commit
1ee3471045
|
@ -500,7 +500,7 @@ static void parse_treeish_arg(const char **argv,
|
||||||
ar_args->time = archive_time;
|
ar_args->time = archive_time;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void extra_file_info_clear(void *util, const char *str)
|
static void extra_file_info_clear(void *util, const char *str UNUSED)
|
||||||
{
|
{
|
||||||
struct extra_file_info *info = util;
|
struct extra_file_info *info = util;
|
||||||
free(info->base);
|
free(info->base);
|
||||||
|
|
|
@ -329,7 +329,7 @@ static uint64_t estimate_repack_memory(struct packed_git *pack)
|
||||||
return os_cache + heap;
|
return os_cache + heap;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int keep_one_pack(struct string_list_item *item, void *data)
|
static int keep_one_pack(struct string_list_item *item, void *data UNUSED)
|
||||||
{
|
{
|
||||||
strvec_pushf(&repack, "--keep-pack=%s", basename(item->string));
|
strvec_pushf(&repack, "--keep-pack=%s", basename(item->string));
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
@ -940,7 +940,7 @@ static int rm(int argc, const char **argv, const char *prefix)
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void clear_push_info(void *util, const char *string)
|
static void clear_push_info(void *util, const char *string UNUSED)
|
||||||
{
|
{
|
||||||
struct push_info *info = util;
|
struct push_info *info = util;
|
||||||
free(info->dest);
|
free(info->dest);
|
||||||
|
|
|
@ -397,7 +397,7 @@ struct conflicted_submodule_item {
|
||||||
int flag;
|
int flag;
|
||||||
};
|
};
|
||||||
|
|
||||||
static void conflicted_submodule_item_free(void *util, const char *str)
|
static void conflicted_submodule_item_free(void *util, const char *str UNUSED)
|
||||||
{
|
{
|
||||||
struct conflicted_submodule_item *item = util;
|
struct conflicted_submodule_item *item = util;
|
||||||
|
|
||||||
|
|
|
@ -55,7 +55,7 @@ static void free_complete_reflog(struct complete_reflogs *array)
|
||||||
free(array);
|
free(array);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void complete_reflogs_clear(void *util, const char *str)
|
static void complete_reflogs_clear(void *util, const char *str UNUSED)
|
||||||
{
|
{
|
||||||
struct complete_reflogs *array = util;
|
struct complete_reflogs *array = util;
|
||||||
free_complete_reflog(array);
|
free_complete_reflog(array);
|
||||||
|
|
|
@ -156,7 +156,7 @@ void filter_string_list(struct string_list *list, int free_util,
|
||||||
list->nr = dst;
|
list->nr = dst;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int item_is_not_empty(struct string_list_item *item, void *unused)
|
static int item_is_not_empty(struct string_list_item *item, void *data UNUSED)
|
||||||
{
|
{
|
||||||
return *item->string != '\0';
|
return *item->string != '\0';
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,7 +8,8 @@
|
||||||
* GIT_CEILING_DIRECTORIES. If the path is unusable for some reason,
|
* GIT_CEILING_DIRECTORIES. If the path is unusable for some reason,
|
||||||
* die with an explanation.
|
* die with an explanation.
|
||||||
*/
|
*/
|
||||||
static int normalize_ceiling_entry(struct string_list_item *item, void *unused)
|
static int normalize_ceiling_entry(struct string_list_item *item,
|
||||||
|
void *data UNUSED)
|
||||||
{
|
{
|
||||||
char *ceil = item->string;
|
char *ceil = item->string;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue