You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
blosc/SOURCES/blosc-gcc11.patch

25 lines
888 B

diff --git a/blosc/blosc.c b/blosc/blosc.c
index a04e161..ad800df 100644
--- a/blosc/blosc.c
+++ b/blosc/blosc.c
@@ -240,6 +240,9 @@ static void my_free(void *block)
/* Copy 4 bytes from `*pa` to int32_t, changing endianness if necessary. */
+/* This routine is not strict-aliasing safe, particularly if it is
+ inlined into its caller. So use attributes to prevent that. */
+__attribute__ ((noinline,noclone,noipa))
static int32_t sw32_(const uint8_t *pa)
{
int32_t idest;
@@ -266,6 +269,9 @@ static int32_t sw32_(const uint8_t *pa)
/* Copy 4 bytes from `*pa` to `*dest`, changing endianness if necessary. */
+/* This routine is not strict-aliasing safe, particularly if it is
+ inlined into its caller. So use attributes to prevent that. */
+__attribute__ ((noinline,noclone,noipa))
static void _sw32(uint8_t* dest, int32_t a)
{
uint8_t *pa = (uint8_t *)&a;