summaryrefslogtreecommitdiffstats
path: root/src/3rdparty/md5
diff options
context:
space:
mode:
authorBradley T. Hughes <bradley.hughes@nokia.com>2011-11-01 12:53:13 (GMT)
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-04-13 18:34:08 (GMT)
commit9ea966e79a7d698fd2622fa5ec27101c13f7cefc (patch)
tree9f52d9986d1edf5db7a23210c3e939863b95c3ed /src/3rdparty/md5
parentc785dfe96e516d5964f8d4c4b1469fda7a9a6bb9 (diff)
downloadQt-9ea966e79a7d698fd2622fa5ec27101c13f7cefc.zip
Qt-9ea966e79a7d698fd2622fa5ec27101c13f7cefc.tar.gz
Qt-9ea966e79a7d698fd2622fa5ec27101c13f7cefc.tar.bz2
Silence warning from clang
The original intent was most likely to memset() the entire MD5Context to zero at the end of MD5Final(), which we do now. In file included from tools/qcryptographichash.cpp:49: ...qtbase/src/corelib/../../include/QtCore/../../src/corelib/tools/../../3rdparty/md5/md5.cpp:139:24: warning: argument to 'sizeof' in 'memset' call is the same expression as the destination; did you mean to dereference it? [-Wsizeof-pointer- memset(ctx, 0, sizeof(ctx)); /* In case it's sensitive */ ~~~ ^~~ Change-Id: I793c6f0944b89c0e4c5f9253cdb1071175c17152 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> (cherry-picked from qtbase commit 2bce4627e63947a3ed55009aeb8ff38974e444d3) Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Diffstat (limited to 'src/3rdparty/md5')
-rw-r--r--src/3rdparty/md5/md5.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/3rdparty/md5/md5.cpp b/src/3rdparty/md5/md5.cpp
index ac296b5..16871e6 100644
--- a/src/3rdparty/md5/md5.cpp
+++ b/src/3rdparty/md5/md5.cpp
@@ -136,7 +136,7 @@ MD5Final(struct MD5Context *ctx, md5byte digest[16])
byteSwap(ctx->buf, 4);
memcpy(digest, ctx->buf, 16);
- memset(ctx, 0, sizeof(ctx)); /* In case it's sensitive */
+ memset(ctx, 0, sizeof(*ctx)); /* In case it's sensitive */
}
#ifndef ASM_MD5