Change 30040 by [EMAIL PROTECTED] on 2007/01/27 18:56:32

        Integrate:
        [ 28759]
        Silence a bunch of Borland compiler warnings in SDBM_File
        (See: http://www.nntp.perl.org/group/perl.daily-build.reports/40283)
        
        [ 28786]
        Subject: [PATCH perl-current]; was RE: [PATCH perlio.c pp.c regcomp.c] 
silence format and comparison warnings
        From: "Robin Barker" <[EMAIL PROTECTED]>
        Date: Fri, 1 Sep 2006 16:10:25 +0100
        Message-ID: <[EMAIL PROTECTED]>
        
        [ 28793]
        cxtype is a U16, not a U32 (Stops VC++ complaining)
        
        [ 28813]
        Subject: NULL and sv_setpv vs. newSVpv
        From: "Yitzchak Scott-Thoennes" <[EMAIL PROTECTED]>
        Date: Sun, 10 Sep 2006 20:31:46 -0700 (PDT)
        Message-ID: <[EMAIL PROTECTED]>
        
        [ 28863]
        Fix one genuine unitialised code path spotted by gcc, and a signed/
        unsigned warning.
        
        [ 28865]
        Subject: [PATCH] bleed -  silence warning in sv.c
        From: "Philip M. Gollucci" <[EMAIL PROTECTED]>
        Date: Mon, 18 Sep 2006 01:30:05 -0700
        Message-ID: <[EMAIL PROTECTED]>
        
        [ 28886]
        Subject: Re: Change 28877: [PATCH] deal with some gcc warnings
        From: Jarkko Hietaniemi <[EMAIL PROTECTED]>
        Message-ID: <[EMAIL PROTECTED]>
        Date: Mon, 25 Sep 2006 07:35:48 +0300
        
        remove casts that were causing failure on FreeBSD -Duse64bitint, and
        some other cleanups.
        
        [ 28899]
        Silence two warnings from gcc when being -pedantic

Affected files ...

... //depot/maint-5.8/perl/XSUB.h#37 integrate
... //depot/maint-5.8/perl/doio.c#100 integrate
... //depot/maint-5.8/perl/dump.c#73 integrate
... //depot/maint-5.8/perl/perl.h#146 integrate
... //depot/maint-5.8/perl/perlio.c#97 integrate
... //depot/maint-5.8/perl/pp.c#132 integrate
... //depot/maint-5.8/perl/pp_ctl.c#165 integrate
... //depot/maint-5.8/perl/pp_pack.c#54 integrate
... //depot/maint-5.8/perl/reentr.c#20 integrate
... //depot/maint-5.8/perl/reentr.pl#27 integrate
... //depot/maint-5.8/perl/sv.c#328 integrate
... //depot/maint-5.8/perl/utf8.c#76 integrate

Differences ...

==== //depot/maint-5.8/perl/XSUB.h#37 (text) ====
Index: perl/XSUB.h
--- perl/XSUB.h#36~30036~       2007-01-27 09:35:47.000000000 -0800
+++ perl/XSUB.h 2007-01-27 10:56:32.000000000 -0800
@@ -352,7 +352,6 @@
             if (name[7] == 's'){                                \
                 arg = sv_2mortal(arg);                          \
             }                                                   \
-            SvOKp(arg);                                         \
        } } STMT_END                                                     
 
 #if 1          /* for compatibility */

==== //depot/maint-5.8/perl/doio.c#100 (text) ====
Index: perl/doio.c
--- perl/doio.c#99~30023~       2007-01-26 13:52:35.000000000 -0800
+++ perl/doio.c 2007-01-27 10:56:32.000000000 -0800
@@ -2218,7 +2218,8 @@
     SETERRNO(0,0);
     if (shmctl(id, IPC_STAT, &shmds) == -1)
        return -1;
-    if (mpos < 0 || msize < 0 || (size_t)mpos + msize > shmds.shm_segsz) {
+    if (mpos < 0 || msize < 0
+       || (size_t)mpos + msize > (size_t)shmds.shm_segsz) {
        SETERRNO(EFAULT,SS_ACCVIO);             /* can't do as caller requested 
*/
        return -1;
     }

==== //depot/maint-5.8/perl/dump.c#73 (text) ====
Index: perl/dump.c
--- perl/dump.c#72~30033~       2007-01-27 08:40:35.000000000 -0800
+++ perl/dump.c 2007-01-27 10:56:32.000000000 -0800
@@ -605,7 +605,7 @@
            Perl_dump_indent(aTHX_ level, file, "  (was %s)\n", 
PL_op_name[o->op_targ]);
            if (o->op_targ == OP_NEXTSTATE) {
                if (CopLINE(cCOPo))
-                   Perl_dump_indent(aTHX_ level, file, "LINE = %"UVf"\n",
+                   Perl_dump_indent(aTHX_ level, file, "LINE = %"UVuf"\n",
                                     (UV)CopLINE(cCOPo));
                if (CopSTASHPV(cCOPo))
                    Perl_dump_indent(aTHX_ level, file, "PACKAGE = \"%s\"\n",
@@ -857,7 +857,7 @@
     case OP_NEXTSTATE:
     case OP_DBSTATE:
        if (CopLINE(cCOPo))
-           Perl_dump_indent(aTHX_ level, file, "LINE = %"UVf"\n",
+           Perl_dump_indent(aTHX_ level, file, "LINE = %"UVuf"\n",
                             (UV)CopLINE(cCOPo));
        if (CopSTASHPV(cCOPo))
            Perl_dump_indent(aTHX_ level, file, "PACKAGE = \"%s\"\n",

==== //depot/maint-5.8/perl/perl.h#146 (text) ====
Index: perl/perl.h
--- perl/perl.h#145~30036~      2007-01-27 09:35:47.000000000 -0800
+++ perl/perl.h 2007-01-27 10:56:32.000000000 -0800
@@ -1422,7 +1422,7 @@
  * that should be true only if the snprintf()/vsnprintf() are true
  * to the standard. */
 
-#if defined(HAS_SNPRINTF) && defined(HAS_C99_VARIADIC_MACROS) && 
!(defined(DEBUGGING) && !defined(PERL_USE_GCC_BRACE_GROUPS))
+#if defined(HAS_SNPRINTF) && defined(HAS_C99_VARIADIC_MACROS) && 
!(defined(DEBUGGING) && !defined(PERL_USE_GCC_BRACE_GROUPS)) && 
!defined(PERL_GCC_PEDANTIC)
 #  ifdef PERL_USE_GCC_BRACE_GROUPS
 #      define my_snprintf(buffer, len, ...) ({ int __len__ = snprintf(buffer, 
len, __VA_ARGS__); if ((len) > 0 && (Size_t)__len__ >= (len)) Perl_croak(aTHX_ 
"panic: snprintf buffer overflow"); __len__; })
 #      define PERL_MY_SNPRINTF_GUARDED
@@ -1434,7 +1434,7 @@
 #  define PERL_MY_SNPRINTF_GUARDED
 #endif
 
-#if defined(HAS_VSNPRINTF) && defined(HAS_C99_VARIADIC_MACROS) && 
!(defined(DEBUGGING) && !defined(PERL_USE_GCC_BRACE_GROUPS))
+#if defined(HAS_VSNPRINTF) && defined(HAS_C99_VARIADIC_MACROS) && 
!(defined(DEBUGGING) && !defined(PERL_USE_GCC_BRACE_GROUPS)) && 
!defined(PERL_GCC_PEDANTIC)
 #  ifdef PERL_USE_GCC_BRACE_GROUPS
 #      define my_vsnprintf(buffer, len, ...) ({ int __len__ = 
vsnprintf(buffer, len, __VA_ARGS__); if ((len) > 0 && (Size_t)__len__ >= (len)) 
Perl_croak(aTHX_ "panic: vsnprintf buffer overflow"); __len__; })
 #      define PERL_MY_VSNPRINTF_GUARDED
@@ -2942,16 +2942,17 @@
 #ifndef SVf256
 #  define SVf256 SVf_precision("256")
 #endif
- 
-#ifndef UVf
-#  define UVf UVuf
-#endif
 
 #ifndef PERL_CORE
 #  ifndef DieNull
 #    define DieNull Perl_vdie(aTHX_ Nullch, Null(va_list *))
 #  endif
 #endif
+ 
+/* not used; but needed for backward compatibilty with XS code? - RMB */ 
+#ifndef UVf
+#  define UVf UVuf
+#endif
 
 /* Because 5.8.x has to keep using %_ for SVf, which will make the format
  * checking code (quite correctly) bleat a lot.  */

==== //depot/maint-5.8/perl/perlio.c#97 (text) ====
Index: perl/perlio.c
--- perl/perlio.c#96~30036~     2007-01-27 09:35:47.000000000 -0800
+++ perl/perlio.c       2007-01-27 10:56:32.000000000 -0800
@@ -2910,6 +2910,7 @@
     f->_fileno = -1;
     return 1;
 #  elif defined(__sun__)
+    PERL_UNUSED_ARG(f);
     return 0;
 #  elif defined(__hpux)
     f->__fileH = 0xff;

==== //depot/maint-5.8/perl/pp.c#132 (text) ====
Index: perl/pp.c
--- perl/pp.c#131~30026~        2007-01-27 03:02:43.000000000 -0800
+++ perl/pp.c   2007-01-27 10:56:32.000000000 -0800
@@ -4034,7 +4034,8 @@
                            STRLEN keylen;
                            const char * const key = SvPV_const(keysv, keylen);
                            SAVEDELETE(hv, savepvn(key,keylen),
-                                      SvUTF8(keysv) ? -keylen : keylen);
+                                      SvUTF8(keysv)
+                                      ? (I32)-keylen : (I32)keylen);
                        }
                    }
                }

==== //depot/maint-5.8/perl/pp_pack.c#54 (text) ====
Index: perl/pp_pack.c
--- perl/pp_pack.c#53~30033~    2007-01-27 08:40:35.000000000 -0800
+++ perl/pp_pack.c      2007-01-27 10:56:32.000000000 -0800
@@ -2061,7 +2061,7 @@
                    if (++bytes >= sizeof(UV)) {        /* promote to string */
                        const char *t;
 
-                       sv = Perl_newSVpvf(aTHX_ "%.*"UVf, 
(int)TYPE_DIGITS(UV), auv);
+                       sv = Perl_newSVpvf(aTHX_ "%.*"UVuf, 
(int)TYPE_DIGITS(UV), auv);
                        while (s < strend) {
                            ch = SHIFT_BYTE(utf8, s, strend, datumtype);
                            sv = mul128(sv, (U8)(ch & 0x7f));

==== //depot/maint-5.8/perl/sv.c#328 (text) ====
Index: perl/sv.c
--- perl/sv.c#327~30036~        2007-01-27 09:35:47.000000000 -0800
+++ perl/sv.c   2007-01-27 10:56:32.000000000 -0800
@@ -3359,7 +3359,7 @@
     case SVt_PVBM:
        if (SvGMAGICAL(sstr) && (flags & SV_GMAGIC)) {
            mg_get(sstr);
-           if ((int)SvTYPE(sstr) != stype) {
+           if (SvTYPE(sstr) != stype) {
                stype = SvTYPE(sstr);
                if (stype == SVt_PVGV && dtype <= SVt_PVGV) {
                    glob_assign_glob(dstr, sstr, dtype);
@@ -4792,8 +4792,8 @@
                        */
                        SAVEI8(PL_utf8cache);
                        PL_utf8cache = 0;
-                       Perl_croak(aTHX_ "panic: sv_len_utf8 cache %"UVf
-                                  " real %"UVf" for %"SVf,
+                       Perl_croak(aTHX_ "panic: sv_len_utf8 cache %"UVuf
+                                  " real %"UVuf" for %"SVf,
                                   (UV) ulen, (UV) real, (void*)sv);
                    }
                }
@@ -4950,8 +4950,8 @@
                   infinitely while printing error messages.  */
                SAVEI8(PL_utf8cache);
                PL_utf8cache = 0;
-               Perl_croak(aTHX_ "panic: sv_pos_u2b_cache cache %"UVf
-                          " real %"UVf" for %"SVf,
+               Perl_croak(aTHX_ "panic: sv_pos_u2b_cache cache %"UVuf
+                          " real %"UVuf" for %"SVf,
                           (UV) boffset, (UV) real_boffset, (void*)sv);
            }
        }
@@ -5083,8 +5083,8 @@
               infinitely while printing error messages.  */
            SAVEI8(PL_utf8cache);
            PL_utf8cache = 0;
-           Perl_croak(aTHX_ "panic: utf8_mg_pos_cache_update cache %"UVf
-                      " real %"UVf" for %"SVf, (UV) utf8, (UV) realutf8, 
(void*)sv);
+           Perl_croak(aTHX_ "panic: utf8_mg_pos_cache_update cache %"UVuf
+                      " real %"UVuf" for %"SVf, (UV) utf8, (UV) realutf8, 
(void*)sv);
        }
     }
 
@@ -5329,8 +5329,8 @@
                   infinitely while printing error messages.  */
                SAVEI8(PL_utf8cache);
                PL_utf8cache = 0;
-               Perl_croak(aTHX_ "panic: sv_pos_b2u cache %"UVf
-                          " real %"UVf" for %"SVf,
+               Perl_croak(aTHX_ "panic: sv_pos_b2u cache %"UVuf
+                          " real %"UVuf" for %"SVf,
                           (UV) len, (UV) real_len, (void*)sv);
            }
        }
@@ -6361,7 +6361,7 @@
     register SV *sv;
 
     new_SV(sv);
-    sv_setpvn(sv,s,len ? len : strlen(s));
+    sv_setpvn(sv, s, len || s == NULL ? len : strlen(s));
     return sv;
 }
 

==== //depot/maint-5.8/perl/utf8.c#76 (text) ====
Index: perl/utf8.c
--- perl/utf8.c#75~30036~       2007-01-27 09:35:47.000000000 -0800
+++ perl/utf8.c 2007-01-27 10:56:32.000000000 -0800
@@ -893,7 +893,7 @@
     }
 
     if (bytelen & 1)
-       Perl_croak(aTHX_ "panic: utf16_to_utf8: odd bytelen %"UVf, (UV)bytelen);
+       Perl_croak(aTHX_ "panic: utf16_to_utf8: odd bytelen %"UVuf, 
(UV)bytelen);
 
     pend = p + bytelen;
 
End of Patch.

Reply via email to