diff options
author | Jarkko Hietaniemi <jhi@iki.fi> | 2001-06-02 16:48:26 +0000 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2001-06-02 16:48:26 +0000 |
commit | 8fa7f3676ed75809365905727fbae97dc8767f29 (patch) | |
tree | 2c626750a9a8493a188833eb82d96b24e79fa03f /ext | |
parent | a126002e7fdcd66f0996dbe9b5b1c2d7960cf31b (diff) | |
download | perl-8fa7f3676ed75809365905727fbae97dc8767f29.tar.gz |
-Wall cleanup continues.
p4raw-id: //depot/perl@10392
Diffstat (limited to 'ext')
-rw-r--r-- | ext/NDBM_File/NDBM_File.xs | 2 | ||||
-rw-r--r-- | ext/POSIX/POSIX.xs | 2 | ||||
-rw-r--r-- | ext/PerlIO/Scalar/Scalar.xs | 1 | ||||
-rw-r--r-- | ext/Storable/Storable.xs | 6 | ||||
-rw-r--r-- | ext/Sys/Hostname/Hostname.xs | 2 | ||||
-rw-r--r-- | ext/Sys/Syslog/Syslog.xs | 28 |
6 files changed, 34 insertions, 7 deletions
diff --git a/ext/NDBM_File/NDBM_File.xs b/ext/NDBM_File/NDBM_File.xs index c417eb693e..55dd639e95 100644 --- a/ext/NDBM_File/NDBM_File.xs +++ b/ext/NDBM_File/NDBM_File.xs @@ -53,7 +53,7 @@ ndbm_TIEHASH(dbtype, filename, flags, mode) DBM * dbp ; RETVAL = NULL ; - if (dbp = dbm_open(filename, flags, mode)) { + if ((dbp = dbm_open(filename, flags, mode))) { RETVAL = (NDBM_File)safemalloc(sizeof(NDBM_File_type)) ; Zero(RETVAL, 1, NDBM_File_type) ; RETVAL->dbp = dbp ; diff --git a/ext/POSIX/POSIX.xs b/ext/POSIX/POSIX.xs index 842131e115..f079b7b257 100644 --- a/ext/POSIX/POSIX.xs +++ b/ext/POSIX/POSIX.xs @@ -3181,7 +3181,6 @@ sigaction(sig, optaction, oldaction = 0) PL_sig_name[sig], strlen(PL_sig_name[sig]), TRUE); - STRLEN n_a; /* Check optaction and set action */ if(SvTRUE(optaction)) { @@ -3740,7 +3739,6 @@ getcwd() #ifdef HAS_GETCWD char * buf; int buflen = 128; - int i; New(0, buf, buflen, char); /* Many getcwd()s know how to automatically allocate memory diff --git a/ext/PerlIO/Scalar/Scalar.xs b/ext/PerlIO/Scalar/Scalar.xs index e1e9349cd9..fb8b39abb6 100644 --- a/ext/PerlIO/Scalar/Scalar.xs +++ b/ext/PerlIO/Scalar/Scalar.xs @@ -67,7 +67,6 @@ PerlIOScalar_close(PerlIO *f) { dTHX; IV code = PerlIOBase_close(f); - PerlIOScalar *s = PerlIOSelf(f,PerlIOScalar); PerlIOBase(f)->flags &= ~(PERLIO_F_RDBUF|PERLIO_F_WRBUF); return code; } diff --git a/ext/Storable/Storable.xs b/ext/Storable/Storable.xs index f306a49df7..542c2a54cd 100644 --- a/ext/Storable/Storable.xs +++ b/ext/Storable/Storable.xs @@ -2136,8 +2136,8 @@ static int store_hook( I32 classnum; int ret; int clone = cxt->optype & ST_CLONE; - char mtype; /* for blessed ref to tied structures */ - unsigned char eflags; /* used when object type is SHT_EXTRA */ + char mtype = 0; /* for blessed ref to tied structures */ + unsigned char eflags = 0; /* used when object type is SHT_EXTRA */ TRACEME(("store_hook, class \"%s\", tagged #%d", HvNAME(pkg), cxt->tagnum)); @@ -4459,7 +4459,7 @@ magic_ok: * information to check. */ - if (cxt->netorder = (use_network_order & 0x1)) + if ((cxt->netorder = (use_network_order & 0x1))) return &PL_sv_undef; /* No byte ordering info */ sprintf(byteorder, "%lx", (unsigned long) BYTEORDER); diff --git a/ext/Sys/Hostname/Hostname.xs b/ext/Sys/Hostname/Hostname.xs index f1043837e9..23ecd694ed 100644 --- a/ext/Sys/Hostname/Hostname.xs +++ b/ext/Sys/Hostname/Hostname.xs @@ -69,7 +69,9 @@ ghname() # endif # endif #endif +#ifndef HAS_GETHOSTNAME check_out: +#endif if (retval == -1) XSRETURN_UNDEF; else diff --git a/ext/Sys/Syslog/Syslog.xs b/ext/Sys/Syslog/Syslog.xs index 24055d9969..e600da0add 100644 --- a/ext/Sys/Syslog/Syslog.xs +++ b/ext/Sys/Syslog/Syslog.xs @@ -30,9 +30,11 @@ constant_LOG_NO(char *name, int len) errno = EINVAL; return 0; +#if !defined(LOG_NOTICE) || !defined(LOG_NOWAIT) not_there: errno = ENOENT; return 0; +#endif } static double @@ -69,9 +71,11 @@ constant_LOG_N(char *name, int len) errno = EINVAL; return 0; +#if !defined(LOG_NDELAY) || !defined(LOG_NEWS) || !defined(LOG_NFACILITIES) not_there: errno = ENOENT; return 0; +#endif } static double @@ -106,9 +110,11 @@ constant_LOG_P(char *name, int len) errno = EINVAL; return 0; +#if !defined(LOG_PERROR) || !defined(LOG_PID) || !defined(LOG_PRIMASK) not_there: errno = ENOENT; return 0; +#endif } static double @@ -139,9 +145,11 @@ constant_LOG_AU(char *name, int len) errno = EINVAL; return 0; +#if !defined(LOG_AUTH) || !defined(LOG_AUTHPRIV) not_there: errno = ENOENT; return 0; +#endif } static double @@ -162,9 +170,11 @@ constant_LOG_A(char *name, int len) errno = EINVAL; return 0; +#if !defined(LOG_ALERT) not_there: errno = ENOENT; return 0; +#endif } static double @@ -191,9 +201,11 @@ constant_LOG_CR(char *name, int len) errno = EINVAL; return 0; +#if !defined(LOG_CRIT) || !defined(LOG_CRON) not_there: errno = ENOENT; return 0; +#endif } static double @@ -214,9 +226,11 @@ constant_LOG_C(char *name, int len) errno = EINVAL; return 0; +#if !defined(LOG_CONS) not_there: errno = ENOENT; return 0; +#endif } static double @@ -243,9 +257,11 @@ constant_LOG_D(char *name, int len) errno = EINVAL; return 0; +#if !defined(LOG_DAEMON) || !defined(LOG_DEBUG) not_there: errno = ENOENT; return 0; +#endif } static double @@ -272,9 +288,11 @@ constant_LOG_U(char *name, int len) errno = EINVAL; return 0; +#if !defined(LOG_USER) || !defined(LOG_UUCP) not_there: errno = ENOENT; return 0; +#endif } static double @@ -301,9 +319,11 @@ constant_LOG_E(char *name, int len) errno = EINVAL; return 0; +#if !defined(LOG_EMERG) || !defined(LOG_ERR) not_there: errno = ENOENT; return 0; +#endif } static double @@ -330,9 +350,11 @@ constant_LOG_F(char *name, int len) errno = EINVAL; return 0; +#if !defined(LOG_FACMASK) || !defined(LOG_FTP) not_there: errno = ENOENT; return 0; +#endif } static double @@ -411,9 +433,11 @@ constant_LOG_LO(char *name, int len) errno = EINVAL; return 0; +#if !defined(LOG_LOCAL0) || !defined(LOG_LOCAL1) || !defined(LOG_LOCAL2) || !defined(LOG_LOCAL3) || !defined(LOG_LOCAL4) || !defined(LOG_LOCAL5) || !defined(LOG_LOCAL6) || !defined(LOG_LOCAL7) not_there: errno = ENOENT; return 0; +#endif } static double @@ -442,9 +466,11 @@ constant_LOG_L(char *name, int len) errno = EINVAL; return 0; +#if !defined(LOG_LFMT) || !defined(LOG_LPR) not_there: errno = ENOENT; return 0; +#endif } static double @@ -544,9 +570,11 @@ constant(char *name, int len) errno = EINVAL; return 0; +#if !defined(LOG_INFO) || !defined(LOG_KERN) || !defined(LOG_MAIL) || !defined(LOG_ODELAY) || !defined(LOG_SYSLOG) || !defined(LOG_WARNING) not_there: errno = ENOENT; return 0; +#endif } |