diff options
author | Jeff King <peff@peff.net> | 2022-12-13 14:12:58 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2022-12-13 16:16:23 +0300 |
commit | c5224f0f4cd53e3b205f54b98bc3dc66a9007c71 (patch) | |
tree | c881f3bee683b914c3606cb559164a08dc9c63fe /cache.h | |
parent | 00271485d4acefda7ff054a1db5d5a39735e28b9 (diff) |
ws: drop unused parameter from ws_blank_line()
We take a ws_rule parameter, but have never looked at it since the
function was added in 877f23ccb8 (Teach "diff --check" about new blank
lines at end, 2008-06-26). A comment in the function does mention how we
_could_ use it, but nobody has felt the need to do so for over a decade.
We could keep it around as reminder of what could be done, but the
comment serves that purpose. And in the meantime, it triggers
-Wunused-parameter.
So let's drop it, which in turn allows us to drop similar arguments
further up the callstack. I've left the comment intact. It does still
say "ws_rule", but that name is used consistently in the whitespace
code, so the meaning is clear.
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'cache.h')
-rw-r--r-- | cache.h | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -1865,7 +1865,7 @@ unsigned ws_check(const char *line, int len, unsigned ws_rule); void ws_check_emit(const char *line, int len, unsigned ws_rule, FILE *stream, const char *set, const char *reset, const char *ws); char *whitespace_error_string(unsigned ws); void ws_fix_copy(struct strbuf *, const char *, int, unsigned, int *); -int ws_blank_line(const char *line, int len, unsigned ws_rule); +int ws_blank_line(const char *line, int len); #define ws_tab_width(rule) ((rule) & WS_TAB_WIDTH_MASK) /* ls-files */ |