From: Andy Lester Date: Sun, 21 May 2006 00:02:40 +0000 (-0500) Subject: clean some lint findings X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=14333449d262b4fad02b614f81937e2c67a05581;p=p5sagit%2Fp5-mst-13.2.git clean some lint findings Message-ID: <20060521050240.GA21051@petdance.com> p4raw-id: //depot/perl@28289 --- diff --git a/embed.fnc b/embed.fnc index 02c7120..15d5976 100644 --- a/embed.fnc +++ b/embed.fnc @@ -1228,7 +1228,7 @@ sR |const char *|get_num |NN const char *ppat|NN I32 *lenptr ns |bool |need_utf8 |NN const char *pat|NN const char *patend ns |char |first_symbol |NN const char *pat|NN const char *patend sR |char * |sv_exp_grow |NN SV *sv|STRLEN needed -sR |char * |bytes_to_uni |NN const U8 *start|STRLEN len|NN char *dest +snR |char * |bytes_to_uni |NN const U8 *start|STRLEN len|NN char *dest #endif #if defined(PERL_IN_PP_CTL_C) || defined(PERL_DECL_PROT) diff --git a/embed.h b/embed.h index e6fa05e..b2ea284 100644 --- a/embed.h +++ b/embed.h @@ -3396,7 +3396,7 @@ #define need_utf8 S_need_utf8 #define first_symbol S_first_symbol #define sv_exp_grow(a,b) S_sv_exp_grow(aTHX_ a,b) -#define bytes_to_uni(a,b,c) S_bytes_to_uni(aTHX_ a,b,c) +#define bytes_to_uni S_bytes_to_uni #endif #endif #if defined(PERL_IN_PP_CTL_C) || defined(PERL_DECL_PROT) diff --git a/hv.c b/hv.c index 04a9ab3..04439fa 100644 --- a/hv.c +++ b/hv.c @@ -2690,16 +2690,12 @@ Perl_refcounted_he_fetch(pTHX_ const struct refcounted_he *chain, SV *keysv, /* Just to be awkward, if you're using this interface the UTF-8-or-not-ness of your key has to exactly match that which is stored. */ SV *value = &PL_sv_placeholder; - bool is_utf8; if (keysv) { if (flags & HVhek_FREEKEY) Safefree(key); key = SvPV_const(keysv, klen); flags = 0; - is_utf8 = (SvUTF8(keysv) != 0); - } else { - is_utf8 = ((flags & HVhek_UTF8) ? TRUE : FALSE); } if (!hash) { diff --git a/perlio.c b/perlio.c index c15e7a8..2f8820e 100644 --- a/perlio.c +++ b/perlio.c @@ -5148,6 +5148,8 @@ PerlIO_vsprintf(char *s, int n, const char *fmt, va_list ap) { dTHX; const int val = my_vsnprintf(s, n > 0 ? n : 0, fmt, ap); + PERL_UNUSED_CONTEXT; + #ifndef PERL_MY_VSNPRINTF_GUARDED if (val < 0 || (n > 0 ? val >= n : 0)) { Perl_croak(aTHX_ "panic: my_vsnprintf overflow in PerlIO_vsprintf\n"); diff --git a/pp_pack.c b/pp_pack.c index d090c7d..fe41b3e 100644 --- a/pp_pack.c +++ b/pp_pack.c @@ -703,7 +703,7 @@ next_uni_uu(pTHX_ const char **s, const char *end, I32 *out) } STATIC char * -S_bytes_to_uni(pTHX_ const U8 *start, STRLEN len, char *dest) { +S_bytes_to_uni(const U8 *start, STRLEN len, char *dest) { const U8 * const end = start + len; while (start < end) { diff --git a/proto.h b/proto.h index 0fca726..94357e7 100644 --- a/proto.h +++ b/proto.h @@ -3341,10 +3341,10 @@ STATIC char * S_sv_exp_grow(pTHX_ SV *sv, STRLEN needed) __attribute__warn_unused_result__ __attribute__nonnull__(pTHX_1); -STATIC char * S_bytes_to_uni(pTHX_ const U8 *start, STRLEN len, char *dest) +STATIC char * S_bytes_to_uni(const U8 *start, STRLEN len, char *dest) __attribute__warn_unused_result__ - __attribute__nonnull__(pTHX_1) - __attribute__nonnull__(pTHX_3); + __attribute__nonnull__(1) + __attribute__nonnull__(3); #endif