From cb4d9e67d8500c4eabf5acd24f0631778ec69f09 Mon Sep 17 00:00:00 2001 From: Tomohiro Kusumi Date: Tue, 3 Jul 2018 21:39:34 -0700 Subject: [PATCH] lib/libdmsg: Fix compile-time warning on Linux warning: pointer targets in passing argument 2 of 'crypto_algos[0].init' differ in signedness note: expected 'char *' but argument is of type 'uint8_t *' --- lib/libdmsg/crypto.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/lib/libdmsg/crypto.c b/lib/libdmsg/crypto.c index da28e4fb29..4e408592c5 100644 --- a/lib/libdmsg/crypto.c +++ b/lib/libdmsg/crypto.c @@ -625,17 +625,19 @@ keyxchgfail: * Use separate session keys and session fixed IVs for receive and * transmit. */ - error = crypto_algos[DMSG_CRYPTO_ALGO].init(&iocom->ioq_rx, handrx.sess, + error = crypto_algos[DMSG_CRYPTO_ALGO].init(&iocom->ioq_rx, + (char*)handrx.sess, crypto_algos[DMSG_CRYPTO_ALGO].keylen, - handrx.sess + crypto_algos[DMSG_CRYPTO_ALGO].keylen, + (char*)handrx.sess + crypto_algos[DMSG_CRYPTO_ALGO].keylen, sizeof(handrx.sess) - crypto_algos[DMSG_CRYPTO_ALGO].keylen, 0 /* decryption */); if (error) goto keyxchgfail; - error = crypto_algos[DMSG_CRYPTO_ALGO].init(&iocom->ioq_tx, handtx.sess, + error = crypto_algos[DMSG_CRYPTO_ALGO].init(&iocom->ioq_tx, + (char*)handtx.sess, crypto_algos[DMSG_CRYPTO_ALGO].keylen, - handtx.sess + crypto_algos[DMSG_CRYPTO_ALGO].keylen, + (char*)handtx.sess + crypto_algos[DMSG_CRYPTO_ALGO].keylen, sizeof(handtx.sess) - crypto_algos[DMSG_CRYPTO_ALGO].keylen, 1 /* encryption */); if (error) -- 2.41.0