diff options
author | Junio C Hamano <gitster@pobox.com> | 2022-12-26 11:42:04 +0900 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2022-12-26 11:42:05 +0900 |
commit | 179547932fb8484a5ab532ef1b56ed8b01946ab5 (patch) | |
tree | 3970dc42db5735f61611a5c3bd9f0f1d60e0c7a4 /diff.c | |
parent | c099531b001146662263869f7092d8598792dc27 (diff) | |
parent | c25d9e529d531adf0697e0c09ba292227c835164 (diff) | |
download | git-179547932fb8484a5ab532ef1b56ed8b01946ab5.tar.gz |
Merge branch 'jk/unused-post-2.39'
Code clean-up around unused function parameters.
* jk/unused-post-2.39:
userdiff: mark unused parameter in internal callback
list-objects-filter: mark unused parameters in virtual functions
diff: mark unused parameters in callbacks
xdiff: mark unused parameter in xdl_call_hunk_func()
xdiff: drop unused parameter in def_ff()
ws: drop unused parameter from ws_blank_line()
list-objects: drop process_gitlink() function
blob: drop unused parts of parse_blob_buffer()
ls-refs: use repository parameter to iterate refs
Diffstat (limited to 'diff.c')
-rw-r--r-- | diff.c | 18 |
1 files changed, 9 insertions, 9 deletions
@@ -604,7 +604,7 @@ static unsigned long diff_filespec_size(struct repository *r, return one->size; } -static int count_trailing_blank(mmfile_t *mf, unsigned ws_rule) +static int count_trailing_blank(mmfile_t *mf) { char *ptr = mf->ptr; long size = mf->size; @@ -622,7 +622,7 @@ static int count_trailing_blank(mmfile_t *mf, unsigned ws_rule) for (prev_eol = ptr; mf->ptr <= prev_eol; prev_eol--) if (*prev_eol == '\n') break; - if (!ws_blank_line(prev_eol + 1, ptr - prev_eol, ws_rule)) + if (!ws_blank_line(prev_eol + 1, ptr - prev_eol)) break; cnt++; ptr = prev_eol - 1; @@ -634,9 +634,8 @@ static void check_blank_at_eof(mmfile_t *mf1, mmfile_t *mf2, struct emit_callback *ecbdata) { int l1, l2, at; - unsigned ws_rule = ecbdata->ws_rule; - l1 = count_trailing_blank(mf1, ws_rule); - l2 = count_trailing_blank(mf2, ws_rule); + l1 = count_trailing_blank(mf1); + l2 = count_trailing_blank(mf2); if (l2 <= l1) { ecbdata->blank_at_eof_in_preimage = 0; ecbdata->blank_at_eof_in_postimage = 0; @@ -1583,7 +1582,7 @@ static int new_blank_line_at_eof(struct emit_callback *ecbdata, const char *line ecbdata->blank_at_eof_in_preimage <= ecbdata->lno_in_preimage && ecbdata->blank_at_eof_in_postimage <= ecbdata->lno_in_postimage)) return 0; - return ws_blank_line(line, len, ecbdata->ws_rule); + return ws_blank_line(line, len); } static void emit_add_line(struct emit_callback *ecbdata, @@ -1955,7 +1954,7 @@ static int color_words_output_graph_prefix(struct diff_words_data *diff_words) static void fn_out_diff_words_aux(void *priv, long minus_first, long minus_len, long plus_first, long plus_len, - const char *func, long funclen) + const char *func UNUSED, long funclen UNUSED) { struct diff_words_data *diff_words = priv; struct diff_words_style *style = diff_words->style; @@ -3185,8 +3184,9 @@ static int is_conflict_marker(const char *line, int marker_size, unsigned long l } static void checkdiff_consume_hunk(void *priv, - long ob, long on, long nb, long nn, - const char *func, long funclen) + long ob UNUSED, long on UNUSED, + long nb, long nn UNUSED, + const char *func UNUSED, long funclen UNUSED) { struct checkdiff_t *data = priv; |