]> git.scripts.mit.edu Git - git.git/commit
use "sentinel" function attribute for variadic lists
authorJeff King <peff@peff.net>
Wed, 10 Jul 2013 00:19:12 +0000 (20:19 -0400)
committerJunio C Hamano <gitster@pobox.com>
Wed, 10 Jul 2013 05:23:09 +0000 (22:23 -0700)
commiteccb614924c9067eeceffa503e4da3683f1c8b6b
tree153f2b480f11456aa7678052a02fd975a89218c7
parent4621085b7eb2f4cffe16d508988ff9b4a874b4ef
use "sentinel" function attribute for variadic lists

This attribute can help gcc notice when callers forget to
add a NULL sentinel to the end of the function. This is our
first use of the sentinel attribute, but we shouldn't need
to #ifdef for other compilers, as __attribute__ is already a
no-op on non-gcc-compatible compilers.

Suggested-by: Bert Wesarg <bert.wesarg@googlemail.com>
More-Spots-Found-By: Matt Kraai <kraai@ftbfs.org>
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
argv-array.h
builtin/revert.c
exec_cmd.h
run-command.h