Merge branch 'ab/unused-annotation'
Undoes 'jk/unused-annotation' topic and redoes it to work around Coccinelle rules misfiring false positives in unrelated codepaths. * ab/unused-annotation: git-compat-util.h: use "deprecated" for UNUSED variables git-compat-util.h: use "UNUSED", not "UNUSED(var)"
This commit is contained in:
@ -190,9 +190,10 @@ struct strbuf;
|
||||
#define _SGI_SOURCE 1
|
||||
|
||||
#if defined(__GNUC__)
|
||||
#define UNUSED(var) UNUSED_##var __attribute__((unused))
|
||||
#define UNUSED __attribute__((unused)) \
|
||||
__attribute__((deprecated ("parameter declared as UNUSED")))
|
||||
#else
|
||||
#define UNUSED(var) UNUSED_##var
|
||||
#define UNUSED
|
||||
#endif
|
||||
|
||||
#if defined(WIN32) && !defined(__CYGWIN__) /* Both MinGW and MSVC */
|
||||
@ -404,9 +405,9 @@ typedef uintmax_t timestamp_t;
|
||||
#endif
|
||||
|
||||
#ifndef platform_core_config
|
||||
static inline int noop_core_config(const char *UNUSED(var),
|
||||
const char *UNUSED(value),
|
||||
void *UNUSED(cb))
|
||||
static inline int noop_core_config(const char *var UNUSED,
|
||||
const char *value UNUSED,
|
||||
void *cb UNUSED)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
@ -500,7 +501,7 @@ static inline void extract_id_from_env(const char *env, uid_t *id)
|
||||
}
|
||||
|
||||
static inline int is_path_owned_by_current_uid(const char *path,
|
||||
struct strbuf *UNUSED(report))
|
||||
struct strbuf *report UNUSED)
|
||||
{
|
||||
struct stat st;
|
||||
uid_t euid;
|
||||
|
||||
Reference in New Issue
Block a user