Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2022-10-28 00:51:52 +0300
committerJunio C Hamano <gitster@pobox.com>2022-10-28 00:51:52 +0300
commit220604042cb222019e7779287ab73615d7869376 (patch)
tree046dd7f16674322480c142016aa164fbdfb3ecb0 /git-compat-util.h
parent99bb1a0bea02c6dc78b6d8a1b219c687d792bf16 (diff)
parent4b992f0a24ad884eb43898cbb468fdf8fbe647bb (diff)
Merge branch 'jk/unused-anno-more'
More UNUSED annotation to help using -Wunused option with the compiler. * jk/unused-anno-more: ll-merge: mark unused parameters in callbacks diffcore-pickaxe: mark unused parameters in pickaxe functions convert: mark unused parameter in null stream filter apply: mark unused parameters in noop error/warning routine apply: mark unused parameters in handlers date: mark unused parameters in handler functions string-list: mark unused callback parameters object-file: mark unused parameters in hash_unknown functions mark unused parameters in trivial compat functions update-index: drop unused argc from do_reupdate() submodule--helper: drop unused argc from module_list_compute() diffstat_consume(): assert non-zero length
Diffstat (limited to 'git-compat-util.h')
-rw-r--r--git-compat-util.h16
1 files changed, 10 insertions, 6 deletions
diff --git a/git-compat-util.h b/git-compat-util.h
index ea53ea4a78..a76d0526f7 100644
--- a/git-compat-util.h
+++ b/git-compat-util.h
@@ -314,7 +314,9 @@ typedef unsigned long uintptr_t;
#ifdef PRECOMPOSE_UNICODE
#include "compat/precompose_utf8.h"
#else
-static inline const char *precompose_argv_prefix(int argc, const char **argv, const char *prefix)
+static inline const char *precompose_argv_prefix(int argc UNUSED,
+ const char **argv UNUSED,
+ const char *prefix)
{
return prefix;
}
@@ -339,7 +341,9 @@ struct itimerval {
#endif
#ifdef NO_SETITIMER
-static inline int setitimer(int which, const struct itimerval *value, struct itimerval *newvalue) {
+static inline int setitimer(int which UNUSED,
+ const struct itimerval *value UNUSED,
+ struct itimerval *newvalue UNUSED) {
return 0; /* pretend success */
}
#endif
@@ -424,7 +428,7 @@ int lstat_cache_aware_rmdir(const char *path);
#endif
#ifndef has_dos_drive_prefix
-static inline int git_has_dos_drive_prefix(const char *path)
+static inline int git_has_dos_drive_prefix(const char *path UNUSED)
{
return 0;
}
@@ -432,7 +436,7 @@ static inline int git_has_dos_drive_prefix(const char *path)
#endif
#ifndef skip_dos_drive_prefix
-static inline int git_skip_dos_drive_prefix(char **path)
+static inline int git_skip_dos_drive_prefix(char **path UNUSED)
{
return 0;
}
@@ -1467,11 +1471,11 @@ int open_nofollow(const char *path, int flags);
#endif
#ifndef _POSIX_THREAD_SAFE_FUNCTIONS
-static inline void flockfile(FILE *fh)
+static inline void flockfile(FILE *fh UNUSED)
{
; /* nothing */
}
-static inline void funlockfile(FILE *fh)
+static inline void funlockfile(FILE *fh UNUSED)
{
; /* nothing */
}