summaryrefslogtreecommitdiff
path: root/jpl
diff options
context:
space:
mode:
authorPaul Marquess <paul.marquess@btinternet.com>1999-06-27 00:19:52 +0100
committerGurusamy Sarathy <gsar@cpan.org>1999-07-07 09:45:43 +0000
commit0453d815b8a74697ff1e5451c27aba2fe537b8e0 (patch)
treeb6275867deb61ba13fb0e665d516f115dd9f1d69 /jpl
parent69e210baba6414aba2758bc791a6dc3e9e167d9d (diff)
downloadperl-0453d815b8a74697ff1e5451c27aba2fe537b8e0.tar.gz
lexical warnings update (warning.t fails one test
due to leaked scalar, investigation pending) Message-ID: <5104D4DBC598D211B5FE0000F8FE7EB29C6C8E@mbtlipnt02.btlabs.bt.co.uk> Subject: [PATCH 5.005_57] Lexical Warnings - mandatory warning are now default warnings p4raw-id: //depot/perl@3640
Diffstat (limited to 'jpl')
-rw-r--r--jpl/JNI/JNI.xs32
1 files changed, 16 insertions, 16 deletions
diff --git a/jpl/JNI/JNI.xs b/jpl/JNI/JNI.xs
index 678e81c66b..ee854c13b5 100644
--- a/jpl/JNI/JNI.xs
+++ b/jpl/JNI/JNI.xs
@@ -2886,8 +2886,8 @@ SetBooleanArrayRegion(array,start,len,buf)
{
if (buf_len_ < len)
Perl_croak(aTHX_ "string is too short");
- else if (buf_len_ > len && PL_dowarn)
- Perl_warn(aTHX_ "string is too long");
+ else if (buf_len_ > len && ckWARN(WARN_UNSAFE))
+ Perl_warner(aTHX_ WARN_UNSAFE, "string is too long");
(*env)->SetBooleanArrayRegion(env, array,start,len,buf);
RESTOREENV;
}
@@ -2905,8 +2905,8 @@ SetByteArrayRegion(array,start,len,buf)
{
if (buf_len_ < len)
Perl_croak(aTHX_ "string is too short");
- else if (buf_len_ > len && PL_dowarn)
- Perl_warn(aTHX_ "string is too long");
+ else if (buf_len_ > len && ckWARN(WARN_UNSAFE))
+ Perl_warner(aTHX_ WARN_UNSAFE, "string is too long");
(*env)->SetByteArrayRegion(env, array,start,len,buf);
RESTOREENV;
}
@@ -2924,8 +2924,8 @@ SetCharArrayRegion(array,start,len,buf)
{
if (buf_len_ < len)
Perl_croak(aTHX_ "string is too short");
- else if (buf_len_ > len && PL_dowarn)
- Perl_warn(aTHX_ "string is too long");
+ else if (buf_len_ > len && ckWARN(WARN_UNSAFE))
+ Perl_warner(aTHX_ WARN_UNSAFE, "string is too long");
(*env)->SetCharArrayRegion(env, array,start,len,buf);
RESTOREENV;
}
@@ -2943,8 +2943,8 @@ SetShortArrayRegion(array,start,len,buf)
{
if (buf_len_ < len)
Perl_croak(aTHX_ "string is too short");
- else if (buf_len_ > len && PL_dowarn)
- Perl_warn(aTHX_ "string is too long");
+ else if (buf_len_ > len && ckWARN(WARN_UNSAFE))
+ Perl_warner(aTHX_ WARN_UNSAFE, "string is too long");
(*env)->SetShortArrayRegion(env, array,start,len,buf);
RESTOREENV;
}
@@ -2962,8 +2962,8 @@ SetIntArrayRegion(array,start,len,buf)
{
if (buf_len_ < len)
Perl_croak(aTHX_ "string is too short");
- else if (buf_len_ > len && PL_dowarn)
- Perl_warn(aTHX_ "string is too long");
+ else if (buf_len_ > len && ckWARN(WARN_UNSAFE))
+ Perl_warner(aTHX_ WARN_UNSAFE, "string is too long");
(*env)->SetIntArrayRegion(env, array,start,len,buf);
RESTOREENV;
}
@@ -2981,8 +2981,8 @@ SetLongArrayRegion(array,start,len,buf)
{
if (buf_len_ < len)
Perl_croak(aTHX_ "string is too short");
- else if (buf_len_ > len && PL_dowarn)
- Perl_warn(aTHX_ "string is too long");
+ else if (buf_len_ > len && ckWARN(WARN_UNSAFE))
+ Perl_warner(aTHX_ WARN_UNSAFE, "string is too long");
(*env)->SetLongArrayRegion(env, array,start,len,buf);
RESTOREENV;
}
@@ -3000,8 +3000,8 @@ SetFloatArrayRegion(array,start,len,buf)
{
if (buf_len_ < len)
Perl_croak(aTHX_ "string is too short");
- else if (buf_len_ > len && PL_dowarn)
- Perl_warn(aTHX_ "string is too long");
+ else if (buf_len_ > len && ckWARN(WARN_UNSAFE))
+ Perl_warner(aTHX_ WARN_UNSAFE, "string is too long");
(*env)->SetFloatArrayRegion(env, array,start,len,buf);
RESTOREENV;
}
@@ -3019,8 +3019,8 @@ SetDoubleArrayRegion(array,start,len,buf)
{
if (buf_len_ < len)
Perl_croak(aTHX_ "string is too short");
- else if (buf_len_ > len && PL_dowarn)
- Perl_warn(aTHX_ "string is too long");
+ else if (buf_len_ > len && ckWARN(WARN_UNSAFE))
+ Perl_warner(aTHX_ WARN_UNSAFE, "string is too long");
(*env)->SetDoubleArrayRegion(env, array,start,len,buf);
RESTOREENV;
}