Front page | perl.perl5.porters |
Postings from January 2004
[PATCH handy.h] RE: MIME-Base64-2.22 [PATCH]
Thread Next
From:
Robin Barker
Date:
January 8, 2004 08:21
Subject:
[PATCH handy.h] RE: MIME-Base64-2.22 [PATCH]
Message ID:
533D273D4014D411AB1D00062938C4D904046787@hotel.npl.co.uk
I think the isxdigit -> isXDIGIT change is right,
but I still get the "subscript has type `char'".
The attached (one-line) patch to handy.h fixes
the warning for me.
Robin
-----Original Message-----
From: Gisle Aas [mailto:gisle@ActiveState.com]
Sent: 08 January 2004 13:29
To: Robin Barker
Cc: 'Nicholas Clark'; perl5-porters@perl.org
Subject: MIME-Base64-2.22 [PATCH]
Robin Barker <Robin.Barker@npl.co.uk> writes:
> I get the following warnings (with -Wall -Wno-unused):
> the first isn't new, the second is.
I was not able to reproduce the "subscript has type `char'" warning
here but I still think this patch should fix it. This patch can be
applied in the perl tree with:
(cd ext/MIME/Base64 && patch -p4) <file
MIME-Base64-2.22 has been uploaded to CPAN as well.
Regards,
Gisle
> ../../../lib/ExtUtils/typemap \
> Base64.xs > Base64.xsc && mv Base64.xsc Base64.c
> /opt/gcc/bin/gcc -c -fno-strict-aliasing -I/usr/local/include \
> -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -Wall -Wno-unused \
> -DVERSION=\"2.21\" -DXS_VERSION=\"2.21\" -fPIC "-I../../.."
> Base64.c
> Base64.xs: In function `XS_MIME__QuotedPrint_encode_qp':
> Base64.xs:298: warning: suggest parentheses around && within ||
> Base64.xs: In function `XS_MIME__QuotedPrint_decode_qp':
> Base64.xs:402: warning: subscript has type `char'
> Base64.xs:402: warning: subscript has type `char'
diff -u -r /tmp/tardiff-3931-1/MIME-Base64-2.21/
/tmp/tardiff-3931-2/MIME-Base64-2.22/
diff -u -r /tmp/tardiff-3931-1/MIME-Base64-2.21/Base64.pm
/tmp/tardiff-3931-2/MIME-Base64-2.22/Base64.pm
--- /tmp/tardiff-3931-1/MIME-Base64-2.21/Base64.pm 2003-10-09
21:15:42.000000000 +0200
+++ /tmp/tardiff-3931-2/MIME-Base64-2.22/Base64.pm 2004-01-08
14:16:33.000000000 +0100
@@ -1,5 +1,5 @@
#
-# $Id: Base64.pm,v 2.34 2003/10/09 19:15:42 gisle Exp $
+# $Id: Base64.pm,v 2.35 2004/01/08 13:16:33 gisle Exp $
package MIME::Base64;
@@ -141,7 +141,7 @@
@ISA = qw(Exporter DynaLoader);
@EXPORT = qw(encode_base64 decode_base64);
-$VERSION = '2.21';
+$VERSION = '2.22';
eval { bootstrap MIME::Base64 $VERSION; };
if ($@) {
diff -u -r /tmp/tardiff-3931-1/MIME-Base64-2.21/Base64.xs
/tmp/tardiff-3931-2/MIME-Base64-2.22/Base64.xs
--- /tmp/tardiff-3931-1/MIME-Base64-2.21/Base64.xs 2003-10-09
21:16:32.000000000 +0200
+++ /tmp/tardiff-3931-2/MIME-Base64-2.22/Base64.xs 2004-01-08
14:15:06.000000000 +0100
@@ -1,4 +1,4 @@
-/* $Id: Base64.xs,v 1.38 2003/10/09 11:26:12 gisle Exp $
+/* $Id: Base64.xs,v 1.40 2004/01/08 13:15:06 gisle Exp $
Copyright 1997-2003 Gisle Aas
@@ -253,7 +253,7 @@
MODULE = MIME::Base64 PACKAGE = MIME::QuotedPrint
-#define qp_isplain(c) ((c) == '\t' || ((c) >= ' ' && (c) <= '~') && (c)
!= '=')
+#define qp_isplain(c) ((c) == '\t' || (((c) >= ' ' && (c) <= '~') &&
(c) != '='))
SV*
encode_qp(sv,...)
@@ -399,7 +399,7 @@
whitespace = 0;
}
if (*str == '=') {
- if ((str + 2) < end && isxdigit(str[1]) &&
isxdigit(str[2])) {
+ if ((str + 2) < end && isXDIGIT(str[1]) &&
isXDIGIT(str[2])) {
char buf[3];
str++;
buf[0] = *str++;
diff -u -r /tmp/tardiff-3931-1/MIME-Base64-2.21/Changes
/tmp/tardiff-3931-2/MIME-Base64-2.22/Changes
--- /tmp/tardiff-3931-1/MIME-Base64-2.21/Changes 2003-10-09
21:07:22.000000000 +0200
+++ /tmp/tardiff-3931-2/MIME-Base64-2.22/Changes 2004-01-08
14:15:47.000000000 +0100
@@ -1,3 +1,11 @@
+2004-01-08 Gisle Aas <gisle@ActiveState.com>
+
+ Release 2.22
+
+ Fix 'gcc -Wall' complaints.
+
+
+
2003-10-09 Gisle Aas <gisle@ActiveState.com>
Release 2.21
-------------------------------------------------------------------
This e-mail and any attachments may contain confidential and/or
privileged material; it is for the intended addressee(s) only.
If you are not a named addressee, you must not use, retain or
disclose such information.
NPL Management Ltd cannot guarantee that the e-mail or any
attachments are free from viruses.
NPL Management Ltd. Registered in England and Wales. No: 2937881
Registered Office: Teddington, Middlesex, United Kingdom TW11 0LW.
-------------------------------------------------------------------
Thread Next
-
[PATCH handy.h] RE: MIME-Base64-2.22 [PATCH]
by Robin Barker