summaryrefslogtreecommitdiffstats
path: root/src/libcryptobox
diff options
context:
space:
mode:
authorDuncan Bellamy <dunk@denkimushi.com>2023-03-14 18:44:21 +0000
committerDuncan Bellamy <dunk@denkimushi.com>2023-03-14 18:44:21 +0000
commitaeac58faaf9826f2b1de0786ccc50ba9d4495cdb (patch)
tree74668cb412ab4f6d3b1fb9cd6f1b138ca991acb8 /src/libcryptobox
parent22fdc56ae5ffc6e3439a5200e053147fee44d0ac (diff)
downloadrspamd-aeac58faaf9826f2b1de0786ccc50ba9d4495cdb.tar.gz
rspamd-aeac58faaf9826f2b1de0786ccc50ba9d4495cdb.zip
[Minor] Fix some compiler warnings
Diffstat (limited to 'src/libcryptobox')
-rw-r--r--src/libcryptobox/base64/avx2.c4
-rw-r--r--src/libcryptobox/base64/sse42.c4
2 files changed, 8 insertions, 0 deletions
diff --git a/src/libcryptobox/base64/avx2.c b/src/libcryptobox/base64/avx2.c
index 432149a29..c44f8edf1 100644
--- a/src/libcryptobox/base64/avx2.c
+++ b/src/libcryptobox/base64/avx2.c
@@ -49,8 +49,10 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
extern const uint8_t base64_table_dec[256];
#ifdef RSPAMD_HAS_TARGET_ATTR
+#if defined(__GNUC__) && !defined(__clang__)
#pragma GCC push_options
#pragma GCC target("avx2")
+#endif
#ifndef __SSE2__
#define __SSE2__
#endif
@@ -281,5 +283,7 @@ repeat:
return ret;
}
+#if defined(__GNUC__) && !defined(__clang__)
#pragma GCC pop_options
#endif
+#endif
diff --git a/src/libcryptobox/base64/sse42.c b/src/libcryptobox/base64/sse42.c
index 806dd5298..f3b812dc9 100644
--- a/src/libcryptobox/base64/sse42.c
+++ b/src/libcryptobox/base64/sse42.c
@@ -49,8 +49,10 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
extern const uint8_t base64_table_dec[256];
#ifdef RSPAMD_HAS_TARGET_ATTR
+#if defined(__GNUC__) && !defined(__clang__)
#pragma GCC push_options
#pragma GCC target("sse4.2")
+#endif
#ifndef __SSE2__
#define __SSE2__
#endif
@@ -263,5 +265,7 @@ repeat:
return ret;
}
+#if defined(__GNUC__) && !defined(__clang__)
#pragma GCC pop_options
#endif
+#endif