Git fork

__attribute__: mark some functions with LAST_ARG_MUST_BE_NULL

Some varargs functions that use NULL-terminated parameter list were
missing __attributes__ ((sentinel)) aka LAST_ARG_MUST_BE_NULL.

Add them.

Signed-off-by: Junio C Hamano <gitster@pobox.com>

+5
+1
add-patch.c
··· 300 300 va_end(args); 301 301 } 302 302 303 + LAST_ARG_MUST_BE_NULL 303 304 static void setup_child_process(struct add_p_state *s, 304 305 struct child_process *cp, ...) 305 306 {
+2
attr.h
··· 190 190 }; 191 191 192 192 struct attr_check *attr_check_alloc(void); 193 + 194 + LAST_ARG_MUST_BE_NULL 193 195 struct attr_check *attr_check_initl(const char *, ...); 194 196 struct attr_check *attr_check_dup(const struct attr_check *check); 195 197
+1
hook.h
··· 86 86 * argument. These things will be used as positional arguments to the 87 87 * hook. This function behaves like the old run_hook_le() API. 88 88 */ 89 + LAST_ARG_MUST_BE_NULL 89 90 int run_hooks_l(const char *hook_name, ...); 90 91 #endif
+1
scalar.c
··· 70 70 strbuf_release(&path); 71 71 } 72 72 73 + LAST_ARG_MUST_BE_NULL 73 74 static int run_git(const char *arg, ...) 74 75 { 75 76 struct child_process cmd = CHILD_PROCESS_INIT;