Module Name: src
Committed By: rillig
Date: Mon Oct 3 05:34:31 UTC 2022
Modified Files:
src/crypto/external/bsd/netpgp/dist/src/lib: keyring.c
Log Message:
netpgp: fix build with Clang (since 2022-10-01)
error: passing 'char [1]' to parameter of type 'const uint8_t *'
(aka 'const unsigned char *') converts between pointers to integer
types where one is of the unique plain 'char' type and the other is
not [-Werror,-Wpointer-sign]
To generate a diff of this commit:
cvs rdiff -u -r1.59 -r1.60 \
src/crypto/external/bsd/netpgp/dist/src/lib/keyring.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/crypto/external/bsd/netpgp/dist/src/lib/keyring.c
diff -u src/crypto/external/bsd/netpgp/dist/src/lib/keyring.c:1.59 src/crypto/external/bsd/netpgp/dist/src/lib/keyring.c:1.60
--- src/crypto/external/bsd/netpgp/dist/src/lib/keyring.c:1.59 Sat Oct 1 22:21:31 2022
+++ src/crypto/external/bsd/netpgp/dist/src/lib/keyring.c Mon Oct 3 05:34:31 2022
@@ -57,7 +57,7 @@
#if defined(__NetBSD__)
__COPYRIGHT("@(#) Copyright (c) 2009 The NetBSD Foundation, Inc. All rights reserved.");
-__RCSID("$NetBSD: keyring.c,v 1.59 2022/10/01 22:21:31 rillig Exp $");
+__RCSID("$NetBSD: keyring.c,v 1.60 2022/10/03 05:34:31 rillig Exp $");
#endif
#ifdef HAVE_FCNTL_H
@@ -1159,7 +1159,7 @@ pgp_export_key(pgp_io_t *io, const pgp_k
pgp_write_xfer_seckey(output, keydata, passphrase,
strlen((char *)passphrase), 1);
}
- pgp_memory_add(mem, "", 1);
+ pgp_memory_add(mem, (uint8_t[]){0}, 1);
cp = netpgp_strdup(pgp_mem_data(mem));
pgp_teardown_memory_write(output, mem);
return cp;