PATCH: Auth: Make a correct cast

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
>From bdb0acaaeb03bfc39e0dfab276e693b2f2e7c1c1 Mon Sep 17 00:00:00 2001
From: Wido den Hollander <wido@xxxxxxxxx>
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


[Index of Archives]     [CEPH Users]     [Ceph Large]     [Information on CEPH]     [Linux BTRFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux