Re: Change 28877: [PATCH] deal with some gcc warnings
Jarkko Hietaniemi [Mon, 25 Sep 2006 07:35:48 +0000 (10:35 +0300)]
Message-ID: <45175CA4.3020900@iki.fi>

remove casts that were causing failure on FreeBSD -Duse64bitint, and
some other cleanups.

p4raw-id: //depot/perl@28886

doio.c
reentr.c
reentr.pl

diff --git a/doio.c b/doio.c
index ef16b07..e6909cb 100644 (file)
--- a/doio.c
+++ b/doio.c
@@ -1333,8 +1333,6 @@ Perl_my_stat(pTHX)
            Perl_warner(aTHX_ packWARN(WARN_NEWLINE), PL_warn_nl, "stat");
        return PL_laststatval;
     }
-    /* Should we warn/croak here? Or do something smart/useful? */
-    return (PL_laststatval = -1);
 }
 
 
index bd46652..9be6f7f 100644 (file)
--- a/reentr.c
+++ b/reentr.c
@@ -44,7 +44,7 @@ Perl_reentrant_size(pTHX) {
 #ifdef HAS_GETGRNAM_R
 #   if defined(HAS_SYSCONF) && defined(_SC_GETGR_R_SIZE_MAX) && !defined(__GLIBC__)
        PL_reentrant_buffer->_grent_size = sysconf(_SC_GETGR_R_SIZE_MAX);
-       if ((IV)PL_reentrant_buffer->_grent_size == (IV)-1)
+       if (PL_reentrant_buffer->_grent_size == -1)
                PL_reentrant_buffer->_grent_size = REENTRANTUSUALSIZE;
 #   else
 #       if defined(__osf__) && defined(__alpha) && defined(SIABUFSIZ)
@@ -79,7 +79,7 @@ Perl_reentrant_size(pTHX) {
 #ifdef HAS_GETPWNAM_R
 #   if defined(HAS_SYSCONF) && defined(_SC_GETPW_R_SIZE_MAX) && !defined(__GLIBC__)
        PL_reentrant_buffer->_pwent_size = sysconf(_SC_GETPW_R_SIZE_MAX);
-       if ((IV)PL_reentrant_buffer->_pwent_size == (IV)-1)
+       if (PL_reentrant_buffer->_pwent_size == -1)
                PL_reentrant_buffer->_pwent_size = REENTRANTUSUALSIZE;
 #   else
 #       if defined(__osf__) && defined(__alpha) && defined(SIABUFSIZ)
@@ -101,7 +101,7 @@ Perl_reentrant_size(pTHX) {
 #ifdef HAS_GETSPNAM_R
 #   if defined(HAS_SYSCONF) && defined(_SC_GETPW_R_SIZE_MAX) && !defined(__GLIBC__)
        PL_reentrant_buffer->_spent_size = sysconf(_SC_GETPW_R_SIZE_MAX);
-       if ((IV)PL_reentrant_buffer->_spent_size == (IV)-1)
+       if (PL_reentrant_buffer->_spent_size == -1)
                PL_reentrant_buffer->_spent_size = REENTRANTUSUALSIZE;
 #   else
 #       if defined(__osf__) && defined(__alpha) && defined(SIABUFSIZ)
index 094a83c..13cf4d1 100644 (file)
--- a/reentr.pl
+++ b/reentr.pl
@@ -547,7 +547,7 @@ EOF
            push @size, <<EOF;
 #   if defined(HAS_SYSCONF) && defined($sc) && !defined(__GLIBC__)
        PL_reentrant_buffer->$sz = sysconf($sc);
-       if ((IV)PL_reentrant_buffer->$sz == (IV)-1)
+       if (PL_reentrant_buffer->$sz == -1)
                PL_reentrant_buffer->$sz = REENTRANTUSUALSIZE;
 #   else
 #       if defined(__osf__) && defined(__alpha) && defined(SIABUFSIZ)