[svn] GnuPG - r5460 - branches/STABLE-BRANCH-1-4/g10
svn author wk
cvs at cvs.gnupg.org
Wed Oct 20 08:51:12 CEST 2010
Author: wk
Date: 2010-10-20 08:51:11 +0200 (Wed, 20 Oct 2010)
New Revision: 5460
Modified:
branches/STABLE-BRANCH-1-4/g10/ChangeLog
branches/STABLE-BRANCH-1-4/g10/encr-data.c
branches/STABLE-BRANCH-1-4/g10/keyid.c
branches/STABLE-BRANCH-1-4/g10/parse-packet.c
branches/STABLE-BRANCH-1-4/g10/trustdb.c
Log:
Remove warnings on VMS
Modified: branches/STABLE-BRANCH-1-4/g10/ChangeLog
===================================================================
--- branches/STABLE-BRANCH-1-4/g10/ChangeLog 2010-10-20 02:27:25 UTC (rev 5459)
+++ branches/STABLE-BRANCH-1-4/g10/ChangeLog 2010-10-20 06:51:11 UTC (rev 5460)
@@ -1,3 +1,10 @@
+2010-10-20 Werner Koch <wk at g10code.com>
+
+ * encr-data.c (decode_filter): Cast -1 to size_t. Reported by
+ Steven M. Schweda.
+ * parse-packet.c (parse_key): Ditto.
+ * trustdb.c (validate_keys): Likewise to unsigned int.
+
2010-10-18 Werner Koch <wk at g10code.com>
* app-openpgp.c (parse_algorithm_attribute): Remove extra const in
Modified: branches/STABLE-BRANCH-1-4/g10/encr-data.c
===================================================================
--- branches/STABLE-BRANCH-1-4/g10/encr-data.c 2010-10-20 02:27:25 UTC (rev 5459)
+++ branches/STABLE-BRANCH-1-4/g10/encr-data.c 2010-10-20 06:51:11 UTC (rev 5460)
@@ -298,7 +298,8 @@
if( control == IOBUFCTRL_UNDERFLOW ) {
assert(a);
n = iobuf_read( a, buf, size );
- if( n == -1 ) n = 0;
+ if (n == (size_t)(-1))
+ n = 0;
if( n ) {
if (fc->cipher_hd)
cipher_decrypt( fc->cipher_hd, buf, buf, n);
Modified: branches/STABLE-BRANCH-1-4/g10/keyid.c
===================================================================
--- branches/STABLE-BRANCH-1-4/g10/keyid.c 2010-10-20 02:27:25 UTC (rev 5459)
+++ branches/STABLE-BRANCH-1-4/g10/keyid.c 2010-10-20 06:51:11 UTC (rev 5460)
@@ -444,6 +444,10 @@
{
struct tm *tp;
+ /* Note: VMS uses an unsigned time_t thus the compiler yields a
+ warning here. You may ignore this warning or def out this test
+ for VMS. The proper way to handle this would be a configure
+ test to a detect properly implemented unsigned time_t. */
if ( atime < 0 ) /* 32 bit time_t and after 2038-01-19 */
strcpy (buffer, "????" "-??" "-??"); /* mark this as invalid */
else {
Modified: branches/STABLE-BRANCH-1-4/g10/parse-packet.c
===================================================================
--- branches/STABLE-BRANCH-1-4/g10/parse-packet.c 2010-10-20 02:27:25 UTC (rev 5459)
+++ branches/STABLE-BRANCH-1-4/g10/parse-packet.c 2010-10-20 06:51:11 UTC (rev 5460)
@@ -1842,7 +1842,7 @@
}
snlen = iobuf_get (inp);
pktlen--;
- if (pktlen < snlen || snlen == -1) {
+ if (pktlen < snlen || snlen == (size_t)(-1)) {
rc = G10ERR_INVALID_PACKET;
goto leave;
}
Modified: branches/STABLE-BRANCH-1-4/g10/trustdb.c
===================================================================
--- branches/STABLE-BRANCH-1-4/g10/trustdb.c 2010-10-20 02:27:25 UTC (rev 5459)
+++ branches/STABLE-BRANCH-1-4/g10/trustdb.c 2010-10-20 06:51:11 UTC (rev 5460)
@@ -2343,7 +2343,7 @@
{
k->ownertrust = ask_ownertrust (k->kid,min);
- if (k->ownertrust == -1)
+ if (k->ownertrust == (unsigned int)(-1))
{
quit=1;
goto leave;
More information about the Gnupg-commits
mailing list