aboutsummaryrefslogtreecommitdiffstats
path: root/process.c
diff options
context:
space:
mode:
authorMattias Andrée <maandree@kth.se>2024-08-24 10:15:35 +0200
committerMattias Andrée <maandree@kth.se>2024-08-24 10:15:35 +0200
commit011d7f381ce17f2f15d3a3c178971de3728c709f (patch)
tree3c52b0856de9aaf3b193f27a9fdd1383e9e69705 /process.c
parentFix warning (diff)
downloadlibsha2-1.1.1.tar.gz
libsha2-1.1.1.tar.bz2
libsha2-1.1.1.tar.xz
Silence warnings1.1.1
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to '')
-rw-r--r--process.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/process.c b/process.c
index eef61f8..9dae6dc 100644
--- a/process.c
+++ b/process.c
@@ -90,6 +90,11 @@ process_x86_sha256(struct libsha2_state *restrict state, const unsigned char *re
abef_orig = s0;
cdgh_orig = s1;
+#if defined(__GNUC__)
+# pragma GCC diagnostic push
+# pragma GCC diagnostic ignored "-Wsign-conversion"
+#endif
+
msg = _mm_loadu_si128((const __m128i *)&chunk[0]);
msg0 = _mm_shuffle_epi8(msg, SHUFFLE_MASK);
msg = _mm_add_epi32(msg0, _mm_set_epi64x(0xE9B5DBA5B5C0FBCFULL, 0x71374491428A2F98ULL));
@@ -226,6 +231,10 @@ process_x86_sha256(struct libsha2_state *restrict state, const unsigned char *re
msg = _mm_shuffle_epi32(msg, 0x0E);
s0 = _mm_sha256rnds2_epu32(s0, s1, msg);
+#if defined(__GNUC__)
+# pragma GCC diagnostic pop
+#endif
+
s0 = _mm_add_epi32(s0, abef_orig);
s1 = _mm_add_epi32(s1, cdgh_orig);
}