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
This commit is contained in:
18
diff.c
18
diff.c
@ -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;
|
||||
|
||||
Reference in New Issue
Block a user