Dear diary, on Sat, Jun 24, 2006 at 03:17:31PM CEST, I got a letter where Petr Baudis <pasky@xxxxxxx> said that... > Dear diary, on Sat, Jun 24, 2006 at 10:37:25AM CEST, I got a letter > where Junio C Hamano <junkio@xxxxxxx> said that... > > Petr Baudis <pasky@xxxxxxx> writes: > > > > > +int > > > +error_xs(const char *err, va_list params) > > > +{ > > > > You said in git-compat-util.h that set_error_routine takes a > > function that returns void, so this gives unnecessary type > > clash. > > > > -------------------------------- > > In file included from /usr/lib/perl/5.8/CORE/perl.h:756, > > from Git.xs:15: > > /usr/lib/perl/5.8/CORE/embed.h:4193:1: warning: "die" redefined > > Git.xs:11:1: warning: this is the location of the previous definition > > Git.xs: In function 'boot_Git': > > Git.xs:57: warning: passing argument 1 of 'set_error_routine' from incompatible pointer type > > Git.xs:58: warning: passing argument 1 of 'set_die_routine' makes qualified function pointer from unqualified > > -------------------------------- > > Oh, I forgot to fix it in the .xs. :-( --- [PATCH] Git.pm: Squash some annoying warnings in Git.xs From: Petr Baudis <pasky@xxxxxxx> Signed-off-by: Petr Baudis <pasky@xxxxxxx> --- perl/Git.xs | 11 ++++------- 1 files changed, 4 insertions(+), 7 deletions(-) diff --git a/perl/Git.xs b/perl/Git.xs index e841e4a..d7a2b75 100644 --- a/perl/Git.xs +++ b/perl/Git.xs @@ -29,21 +29,18 @@ report_xs(const char *prefix, const char return buf; } -void +void NORETURN die_xs(const char *err, va_list params) { - char *str; - str = report_xs("fatal: ", err, params); + char *str = report_xs("fatal: ", err, params); croak(str); } -int +void error_xs(const char *err, va_list params) { - char *str; - str = report_xs("error: ", err, params); + char *str = report_xs("error: ", err, params); warn(str); - return -1; } -- Petr "Pasky" Baudis Stuff: http://pasky.or.cz/ A person is just about as big as the things that make them angry. - : 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