OSDN Git Service

Merge branch 'jk/gcc-function-attributes'
authorJunio C Hamano <gitster@pobox.com>
Mon, 22 Jul 2013 18:23:59 +0000 (11:23 -0700)
committerJunio C Hamano <gitster@pobox.com>
Mon, 22 Jul 2013 18:23:59 +0000 (11:23 -0700)
Use the function attributes extension to catch mistakes in use of
our own variadic functions that use NULL sentinel at the end
(i.e. like execl(3)) and format strings (i.e. like printf(3)).

* jk/gcc-function-attributes:
  Add the LAST_ARG_MUST_BE_NULL macro
  wt-status: use "format" function attribute for status_printf
  use "sentinel" function attribute for variadic lists
  add missing "format" function attributes

1  2 
advice.h
git-compat-util.h
transport-helper.c

diff --cc advice.h
+++ b/advice.h
@@@ -17,10 -17,9 +17,11 @@@ extern int advice_resolve_conflict
  extern int advice_implicit_identity;
  extern int advice_detached_head;
  extern int advice_set_upstream_failure;
 +extern int advice_object_name_warning;
 +extern int advice_rm_hints;
  
  int git_default_advice_config(const char *var, const char *value);
+ __attribute__((format (printf, 1, 2)))
  void advise(const char *advice, ...);
  int error_resolve_conflict(const char *me);
  extern void NORETURN die_resolve_conflict(const char *me);
Simple merge
Simple merge