summaryrefslogtreecommitdiff
path: root/apply.c
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2022-10-18 01:08:48 (GMT)
committerJunio C Hamano <gitster@pobox.com>2022-10-18 04:24:04 (GMT)
commit0cff86990cbae9d5c8ca78cd09cb58f74828979b (patch)
tree87b013d0ac0c30a756197d1f8309eb0c3effb333 /apply.c
parent7829746a6ceca69813348331833b0b6940f41d54 (diff)
downloadgit-0cff86990cbae9d5c8ca78cd09cb58f74828979b.zip
git-0cff86990cbae9d5c8ca78cd09cb58f74828979b.tar.gz
git-0cff86990cbae9d5c8ca78cd09cb58f74828979b.tar.bz2
apply: mark unused parameters in handlers
In parse_git_diff_header(), we have a table-driven parser that maps strings to handler functions. Not all handlers need all of the parameters; let's mark the unused ones to appease -Wunused-parameter. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'apply.c')
-rw-r--r--apply.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/apply.c b/apply.c
index 2b7cd93..fa9a027 100644
--- a/apply.c
+++ b/apply.c
@@ -892,9 +892,9 @@ static int parse_traditional_patch(struct apply_state *state,
return 0;
}
-static int gitdiff_hdrend(struct gitdiff_data *state,
- const char *line,
- struct patch *patch)
+static int gitdiff_hdrend(struct gitdiff_data *state UNUSED,
+ const char *line UNUSED,
+ struct patch *patch UNUSED)
{
return 1;
}
@@ -1044,7 +1044,7 @@ static int gitdiff_renamedst(struct gitdiff_data *state,
return 0;
}
-static int gitdiff_similarity(struct gitdiff_data *state,
+static int gitdiff_similarity(struct gitdiff_data *state UNUSED,
const char *line,
struct patch *patch)
{
@@ -1054,7 +1054,7 @@ static int gitdiff_similarity(struct gitdiff_data *state,
return 0;
}
-static int gitdiff_dissimilarity(struct gitdiff_data *state,
+static int gitdiff_dissimilarity(struct gitdiff_data *state UNUSED,
const char *line,
struct patch *patch)
{
@@ -1104,9 +1104,9 @@ static int gitdiff_index(struct gitdiff_data *state,
* This is normal for a diff that doesn't change anything: we'll fall through
* into the next diff. Tell the parser to break out.
*/
-static int gitdiff_unrecognized(struct gitdiff_data *state,
- const char *line,
- struct patch *patch)
+static int gitdiff_unrecognized(struct gitdiff_data *state UNUSED,
+ const char *line UNUSED,
+ struct patch *patch UNUSED)
{
return 1;
}