[Cmake-commits] CMake branch, next, updated. v2.8.6-1935-gd2a781d
Brad King
brad.king at kitware.com
Thu Nov 17 11:13:46 EST 2011
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".
The branch, next has been updated
via d2a781d6324fcb0b0b5fa7ce69ffa169f8947318 (commit)
via e66a4f0304cb72dd36f6918979fb024aea598431 (commit)
via 90877f168824bc8c7aec355dc5fb7645420f48d1 (commit)
from db52df11959d67c43aa1f1f87782230fbb9471ef (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=d2a781d6324fcb0b0b5fa7ce69ffa169f8947318
commit d2a781d6324fcb0b0b5fa7ce69ffa169f8947318
Merge: db52df1 e66a4f0
Author: Brad King <brad.king at kitware.com>
AuthorDate: Thu Nov 17 11:13:44 2011 -0500
Commit: CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Thu Nov 17 11:13:44 2011 -0500
Merge topic 'crypto-hash' into next
e66a4f0 sha2: Suppress -Wcast-align warning from Clang
90877f1 sha2: Cast safe conversions to smaller integer types
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e66a4f0304cb72dd36f6918979fb024aea598431
commit e66a4f0304cb72dd36f6918979fb024aea598431
Author: Brad King <brad.king at kitware.com>
AuthorDate: Thu Nov 17 11:12:00 2011 -0500
Commit: Brad King <brad.king at kitware.com>
CommitDate: Thu Nov 17 11:12:00 2011 -0500
sha2: Suppress -Wcast-align warning from Clang
The code does contain a cast that increases alignment but only for
pointers into structures known to be sufficiently aligned.
diff --git a/Source/cm_sha2.c b/Source/cm_sha2.c
index 7991d27..b1798a8 100644
--- a/Source/cm_sha2.c
+++ b/Source/cm_sha2.c
@@ -106,6 +106,9 @@ typedef cm_sha2_uint64_t sha_word64; /* Exactly 8 bytes */
#if defined(__BORLANDC__)
# pragma warn -8004 /* variable assigned value that is never used */
#endif
+#if defined(__clang__)
+# pragma clang diagnostic ignored "-Wcast-align"
+#endif
/*** ENDIAN REVERSAL MACROS *******************************************/
#if BYTE_ORDER == LITTLE_ENDIAN
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=90877f168824bc8c7aec355dc5fb7645420f48d1
commit 90877f168824bc8c7aec355dc5fb7645420f48d1
Author: Brad King <brad.king at kitware.com>
AuthorDate: Thu Nov 17 11:07:43 2011 -0500
Commit: Brad King <brad.king at kitware.com>
CommitDate: Thu Nov 17 11:07:43 2011 -0500
sha2: Cast safe conversions to smaller integer types
Add a cast to lines converting "uint64_t" to "unsigned int" that are
known safe due to use of modulus with a small integer. This avoids
compiler warnings such as
conversion from 'cm_sha2_uint64_t' to 'unsigned int',
possible loss of data
from MSVC.
diff --git a/Source/cm_sha2.c b/Source/cm_sha2.c
index b89f8fe..7991d27 100644
--- a/Source/cm_sha2.c
+++ b/Source/cm_sha2.c
@@ -652,7 +652,7 @@ void SHA1_Update(SHA_CTX* context, const sha_byte *data, size_t len) {
/* Sanity check: */
assert(context != (SHA_CTX*)0 && data != (sha_byte*)0);
- usedspace = (context->s1.bitcount >> 3) % 64;
+ usedspace = (unsigned int)((context->s1.bitcount >> 3) % 64);
if (usedspace > 0) {
/* Calculate how much free space is available in the buffer */
freespace = 64 - usedspace;
@@ -705,7 +705,7 @@ void SHA1_Final(sha_byte digest[], SHA_CTX* context) {
return;
}
- usedspace = (context->s1.bitcount >> 3) % 64;
+ usedspace = (unsigned int)((context->s1.bitcount >> 3) % 64);
if (usedspace == 0) {
/* Set-up for the last transform: */
MEMSET_BZERO(context->s1.buffer, 56);
@@ -992,7 +992,7 @@ void SHA256_Update(SHA_CTX* context, const sha_byte *data, size_t len) {
/* Sanity check: */
assert(context != (SHA_CTX*)0 && data != (sha_byte*)0);
- usedspace = (context->s256.bitcount >> 3) % 64;
+ usedspace = (unsigned int)((context->s256.bitcount >> 3) % 64);
if (usedspace > 0) {
/* Calculate how much free space is available in the buffer */
freespace = 64 - usedspace;
@@ -1032,7 +1032,7 @@ void SHA256_Update(SHA_CTX* context, const sha_byte *data, size_t len) {
void SHA256_Internal_Last(SHA_CTX* context) {
unsigned int usedspace;
- usedspace = (context->s256.bitcount >> 3) % 64;
+ usedspace = (unsigned int)((context->s256.bitcount >> 3) % 64);
#if BYTE_ORDER == LITTLE_ENDIAN
/* Convert FROM host byte order */
REVERSE64(context->s256.bitcount,context->s256.bitcount);
@@ -1399,7 +1399,7 @@ void SHA512_Update(SHA_CTX* context, const sha_byte *data, size_t len) {
/* Sanity check: */
assert(context != (SHA_CTX*)0 && data != (sha_byte*)0);
- usedspace = (context->s512.bitcount[0] >> 3) % 128;
+ usedspace = (unsigned int)((context->s512.bitcount[0] >> 3) % 128);
if (usedspace > 0) {
/* Calculate how much free space is available in the buffer */
freespace = 128 - usedspace;
@@ -1439,7 +1439,7 @@ void SHA512_Update(SHA_CTX* context, const sha_byte *data, size_t len) {
void SHA512_Internal_Last(SHA_CTX* context) {
unsigned int usedspace;
- usedspace = (context->s512.bitcount[0] >> 3) % 128;
+ usedspace = (unsigned int)((context->s512.bitcount[0] >> 3) % 128);
#if BYTE_ORDER == LITTLE_ENDIAN
/* Convert FROM host byte order */
REVERSE64(context->s512.bitcount[0],context->s512.bitcount[0]);
-----------------------------------------------------------------------
Summary of changes:
Source/cm_sha2.c | 15 +++++++++------
1 files changed, 9 insertions(+), 6 deletions(-)
hooks/post-receive
--
CMake
More information about the Cmake-commits
mailing list