Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/BLAKE2/BLAKE2.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKai Köhne <kai.koehne@qt.io>2021-04-20 15:31:23 +0300
committerKai Köhne <kai.koehne@qt.io>2021-04-21 10:10:59 +0300
commit659129c861c1bd42b4e3714bb1da3a7c7dc4fb11 (patch)
tree0810f655f1ede4fb4c913123ea220d29bef1c718
parentb52178a376ca85a8ffe50492263c2a5bc0fa4f46 (diff)
Avoid MSVC warning C4804
Fixes warnings like blake2.h(140): warning C4804: '/': unsafe use of type 'bool' in operation blake2.h(141): warning C4804: '/': unsafe use of type 'bool' in operation
-rw-r--r--neon/blake2.h4
-rw-r--r--power8/blake2.h4
-rw-r--r--ref/blake2.h4
-rw-r--r--sse/blake2.h4
4 files changed, 8 insertions, 8 deletions
diff --git a/neon/blake2.h b/neon/blake2.h
index ad62f26..ca39030 100644
--- a/neon/blake2.h
+++ b/neon/blake2.h
@@ -137,8 +137,8 @@ extern "C" {
/* Padded structs result in a compile-time error */
enum {
- BLAKE2_DUMMY_1 = 1/(sizeof(blake2s_param) == BLAKE2S_OUTBYTES),
- BLAKE2_DUMMY_2 = 1/(sizeof(blake2b_param) == BLAKE2B_OUTBYTES)
+ BLAKE2_DUMMY_1 = 1/(int)(sizeof(blake2s_param) == BLAKE2S_OUTBYTES),
+ BLAKE2_DUMMY_2 = 1/(int)(sizeof(blake2b_param) == BLAKE2B_OUTBYTES)
};
/* Streaming API */
diff --git a/power8/blake2.h b/power8/blake2.h
index 53e37c4..2f93e9e 100644
--- a/power8/blake2.h
+++ b/power8/blake2.h
@@ -133,8 +133,8 @@ extern "C" {
/* Padded structs result in a compile-time error */
enum {
- BLAKE2_DUMMY_1 = 1/(sizeof(blake2s_param) == BLAKE2S_OUTBYTES),
- BLAKE2_DUMMY_2 = 1/(sizeof(blake2b_param) == BLAKE2B_OUTBYTES)
+ BLAKE2_DUMMY_1 = 1/(int)(sizeof(blake2s_param) == BLAKE2S_OUTBYTES),
+ BLAKE2_DUMMY_2 = 1/(int)(sizeof(blake2b_param) == BLAKE2B_OUTBYTES)
};
/* Streaming API */
diff --git a/ref/blake2.h b/ref/blake2.h
index ad62f26..ca39030 100644
--- a/ref/blake2.h
+++ b/ref/blake2.h
@@ -137,8 +137,8 @@ extern "C" {
/* Padded structs result in a compile-time error */
enum {
- BLAKE2_DUMMY_1 = 1/(sizeof(blake2s_param) == BLAKE2S_OUTBYTES),
- BLAKE2_DUMMY_2 = 1/(sizeof(blake2b_param) == BLAKE2B_OUTBYTES)
+ BLAKE2_DUMMY_1 = 1/(int)(sizeof(blake2s_param) == BLAKE2S_OUTBYTES),
+ BLAKE2_DUMMY_2 = 1/(int)(sizeof(blake2b_param) == BLAKE2B_OUTBYTES)
};
/* Streaming API */
diff --git a/sse/blake2.h b/sse/blake2.h
index ad62f26..ca39030 100644
--- a/sse/blake2.h
+++ b/sse/blake2.h
@@ -137,8 +137,8 @@ extern "C" {
/* Padded structs result in a compile-time error */
enum {
- BLAKE2_DUMMY_1 = 1/(sizeof(blake2s_param) == BLAKE2S_OUTBYTES),
- BLAKE2_DUMMY_2 = 1/(sizeof(blake2b_param) == BLAKE2B_OUTBYTES)
+ BLAKE2_DUMMY_1 = 1/(int)(sizeof(blake2s_param) == BLAKE2S_OUTBYTES),
+ BLAKE2_DUMMY_2 = 1/(int)(sizeof(blake2b_param) == BLAKE2B_OUTBYTES)
};
/* Streaming API */