Jeff King <peff@xxxxxxxx> writes: > On Tue, Jul 09, 2013 at 08:05:19AM +0200, Bert Wesarg wrote: > > > + argv_array_pushl(&args, "send-pack", "--stateless-rpc", "--helper-status"); > > > > missing NULL sentinel. GCC has the 'sentinel' [1] attribute to catch > > such errors. Or use macro magic: > > > > void argv_array_pushl_(struct argv_array *array, ...); > > #define argv_array_pushl(array, ...) argv_array_pushl_(array, __VA_ARGS__, NULL) > > Nice catch. We cannot use variadic macros, because we support pre-C99 > compilers that do not have them. But the sentinel attribute is a good > idea. Here's a patch. This attribute could also be used for builtin/revert.c:verify_opt_compatible, builtin/revert.c:verify_opt_mutually_compatible, exec_cmd.h:execl_git_cmd, and run-command.h:run_hook. -- Matt -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html