Browse Source
In the non-Windows version of this function, we never have any errors to report, and thus the "report" parameter is unused. But we can't drop it, because we have to maintain function call compatibility with the version in compat/mingw.h, which does use this parameter. Note that there's an extra level of indirection here; the common function is actually is_path_owned_by_current_user, which is a macro pointing to "by_current_uid" or "by_current_sid", depending on the platform. So an alternative here is to eat the unused parameter in the macro, since -Wunused-parameter doesn't complain about macros. But I think the UNUSED() annotation is less obfuscated for somebody reading the code later. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>maint
Jeff King
2 years ago
committed by
Junio C Hamano
1 changed files with 2 additions and 1 deletions
Loading…
Reference in new issue