mirror of
https://git.proxmox.com/git/libgit2
synced 2025-05-29 22:25:04 +00:00
Leverage GIT_UNUSED macro to explicitly mark a function parameter as purposely unused
This commit is contained in:
parent
fa6420f73e
commit
2de0652bb6
@ -27,7 +27,9 @@ int diff_file_fn(
|
|||||||
float progress)
|
float progress)
|
||||||
{
|
{
|
||||||
diff_expects *e = cb_data;
|
diff_expects *e = cb_data;
|
||||||
(void)progress;
|
|
||||||
|
GIT_UNUSED(progress);
|
||||||
|
|
||||||
e->files++;
|
e->files++;
|
||||||
switch (delta->status) {
|
switch (delta->status) {
|
||||||
case GIT_DELTA_ADDED: e->file_adds++; break;
|
case GIT_DELTA_ADDED: e->file_adds++; break;
|
||||||
@ -48,9 +50,11 @@ int diff_hunk_fn(
|
|||||||
size_t header_len)
|
size_t header_len)
|
||||||
{
|
{
|
||||||
diff_expects *e = cb_data;
|
diff_expects *e = cb_data;
|
||||||
(void)delta;
|
|
||||||
(void)header;
|
GIT_UNUSED(delta);
|
||||||
(void)header_len;
|
GIT_UNUSED(header);
|
||||||
|
GIT_UNUSED(header_len);
|
||||||
|
|
||||||
e->hunks++;
|
e->hunks++;
|
||||||
e->hunk_old_lines += range->old_lines;
|
e->hunk_old_lines += range->old_lines;
|
||||||
e->hunk_new_lines += range->new_lines;
|
e->hunk_new_lines += range->new_lines;
|
||||||
@ -66,10 +70,12 @@ int diff_line_fn(
|
|||||||
size_t content_len)
|
size_t content_len)
|
||||||
{
|
{
|
||||||
diff_expects *e = cb_data;
|
diff_expects *e = cb_data;
|
||||||
(void)delta;
|
|
||||||
(void)range;
|
GIT_UNUSED(delta);
|
||||||
(void)content;
|
GIT_UNUSED(range);
|
||||||
(void)content_len;
|
GIT_UNUSED(content);
|
||||||
|
GIT_UNUSED(content_len);
|
||||||
|
|
||||||
e->lines++;
|
e->lines++;
|
||||||
switch (line_origin) {
|
switch (line_origin) {
|
||||||
case GIT_DIFF_LINE_CONTEXT:
|
case GIT_DIFF_LINE_CONTEXT:
|
||||||
|
Loading…
Reference in New Issue
Block a user