mirror of
https://github.com/cesanta/mongoose.git
synced 2026-11-19 19:40:56 +00:00
Squashed warning about dangerous optimization
This commit is contained in:
1 parent
c88b7b19b3
commit
257dacd7bb
1 file changed
+4
-2
+4
-2
@@ -1347,8 +1347,10 @@ static void SHA1Transform(uint32_t state[5], const unsigned char buffer[64]) {
|
|||||||
state[2] += c;
|
state[2] += c;
|
||||||
state[3] += d;
|
state[3] += d;
|
||||||
state[4] += e;
|
state[4] += e;
|
||||||
a = b = c = d = e = 0;
|
// Erase working structures. The order of operations is important,
|
||||||
memset(block, '\0', sizeof(block));
|
// used to ensure that compiler doesn't optimize those out.
|
||||||
|
memset(block, 0, sizeof(block));
|
||||||
|
a = b = c = d = e = block[0].l[0];
|
||||||
}
|
}
|
||||||
|
|
||||||
static void SHA1Init(SHA1_CTX* context) {
|
static void SHA1Init(SHA1_CTX* context) {
|
||||||
|
|||||||
Reference in new issue
Block a user