Merge branch 'jc/varargs-attributes'
Varargs functions that are unannotated as printf-like or execl-like have been annotated as such. * jc/varargs-attributes: __attribute__: add a few missing format attributes __attribute__: mark some functions with LAST_ARG_MUST_BE_NULL __attribute__: remove redundant attribute declaration for git_die_config() __attribute__: trace2_region_enter_printf() is like "printf"
This commit is contained in:
2
scalar.c
2
scalar.c
@ -70,6 +70,7 @@ static void setup_enlistment_directory(int argc, const char **argv,
|
||||
strbuf_release(&path);
|
||||
}
|
||||
|
||||
LAST_ARG_MUST_BE_NULL
|
||||
static int run_git(const char *arg, ...)
|
||||
{
|
||||
struct child_process cmd = CHILD_PROCESS_INIT;
|
||||
@ -288,6 +289,7 @@ static int unregister_dir(void)
|
||||
}
|
||||
|
||||
/* printf-style interface, expects `<key>=<value>` argument */
|
||||
__attribute__((format (printf, 1, 2)))
|
||||
static int set_config(const char *fmt, ...)
|
||||
{
|
||||
struct strbuf buf = STRBUF_INIT;
|
||||
|
||||
Reference in New Issue
Block a user