All of lore.kernel.org
 help / color / mirror / Atom feed
From: Wido den Hollander <wido@widodh.nl>
To: ceph-devel@vger.kernel.org
Subject: PATCH: Auth: Make a correct cast
Date: Sat, 31 Jul 2010 11:29:58 +0200	[thread overview]
Message-ID: <1280568598.2116.5.camel@wido-laptop.pcextreme.nl> (raw)

[-- Attachment #1: Type: text/plain, Size: 691 bytes --]

Hi,

Commit 8b8fd7e9c22153024b1ce1438b8737b37df6f3aa introduced a compile
issue under Ubuntu 10.04 AMD64 (Don't know what other platforms did).

CEPH_AES_IV is not casted correctly, which causes the compile to fail:

g++ -DHAVE_CONFIG_H -I.    -Wall -D__CEPH__ -D_FILE_OFFSET_BITS=64
-D_REENTRANT -D_THREAD_SAFE -rdynamic -g -O2 -MT librados_a-Crypto.o -MD
-MP -MF .deps/librados_a-Crypto.Tpo -c -o librados_a-Crypto.o `test -f
'auth/Crypto.cc' || echo './'`auth/Crypto.cc
auth/Crypto.cc:110: error: invalid conversion from ‘const char*’ to
‘const unsigned char*’
make: *** [librados_a-Crypto.o] Error 1

The attached patch makes a correct cast and makes it compile correctly.

Wido

[-- Attachment #2: 0001-auth-Make-a-correct-cast.patch --]
[-- Type: text/x-patch, Size: 706 bytes --]

From bdb0acaaeb03bfc39e0dfab276e693b2f2e7c1c1 Mon Sep 17 00:00:00 2001
From: Wido den Hollander <wido@widodh.nl>
Date: Sat, 31 Jul 2010 11:27:24 +0200
Subject: [PATCH] auth: Make a correct cast

---
 src/auth/Crypto.cc |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/auth/Crypto.cc b/src/auth/Crypto.cc
index 102c8d2..26b7b5c 100644
--- a/src/auth/Crypto.cc
+++ b/src/auth/Crypto.cc
@@ -107,7 +107,7 @@ public:
   int decrypt(bufferptr& secret, const bufferlist& in, bufferlist& out);
 };
 
-static const unsigned char *aes_iv = CEPH_AES_IV;
+static const unsigned char *aes_iv = (const unsigned char *)CEPH_AES_IV;
 
 int CryptoAES::create(bufferptr& secret)
 {
-- 
1.7.0.4


                 reply	other threads:[~2010-07-31  9:30 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1280568598.2116.5.camel@wido-laptop.pcextreme.nl \
    --to=wido@widodh.nl \
    --cc=ceph-devel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.