1
0
mirror of git://git.gnupg.org/gnupg.git synced 2025-02-01 16:33:02 +01:00

Remove warnings on VMS

This commit is contained in:
Werner Koch 2010-10-20 06:51:11 +00:00
parent 72ef16b939
commit 397f9cd6a1
5 changed files with 15 additions and 3 deletions

View File

@ -1,3 +1,10 @@
2010-10-20 Werner Koch <wk@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@g10code.com>
* app-openpgp.c (parse_algorithm_attribute): Remove extra const in

View File

@ -298,7 +298,8 @@ decode_filter( void *opaque, int control, IOBUF a, byte *buf, size_t *ret_len)
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);

View File

@ -444,6 +444,10 @@ mk_datestr (char *buffer, time_t atime)
{
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 {

View File

@ -1842,7 +1842,7 @@ parse_key( IOBUF inp, int pkttype, unsigned long pktlen,
}
snlen = iobuf_get (inp);
pktlen--;
if (pktlen < snlen || snlen == -1) {
if (pktlen < snlen || snlen == (size_t)(-1)) {
rc = G10ERR_INVALID_PACKET;
goto leave;
}

View File

@ -2343,7 +2343,7 @@ validate_keys (int interactive)
{
k->ownertrust = ask_ownertrust (k->kid,min);
if (k->ownertrust == -1)
if (k->ownertrust == (unsigned int)(-1))
{
quit=1;
goto leave;