summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJussi Kivilinna <jussi.kivilinna@iki.fi>2023-03-01 11:36:18 +0200
committerJussi Kivilinna <jussi.kivilinna@iki.fi>2023-03-01 11:36:18 +0200
commit0a5f7e9543a823034f6dd6dae2f647c4e213f213 (patch)
treeec0759af58adc48a2f904c8fa11b79ece86b8bd3
parent66bae697a853b21e0a2ff2a5031d23e3691a9084 (diff)
downloadlibgcrypt-0a5f7e9543a823034f6dd6dae2f647c4e213f213.tar.gz
Fix "'inline' is not at beginning of declaration" warnings
* cipher/chacha20-ppc.c (chacha20_ppc_blocks1) (chacha20_ppc_blocks4, chacha20_poly1305_ppc_blocks4): Move 'ASM_FUNC_ATTR_INLINE' right after 'static'. * cipher/sha256-ppc.c (sha256_transform_ppc): Likewise. * cipher/sha512-ppc.c (sha512_transform_ppc): Likewise. -- Patch fixes these GCC warnings in PowerPC implementations: warning: 'inline' is not at beginning of declaration [-Wold-style-declaration] Signed-off-by: Jussi Kivilinna <jussi.kivilinna@iki.fi>
-rw-r--r--cipher/chacha20-ppc.c8
-rw-r--r--cipher/sha256-ppc.c2
-rw-r--r--cipher/sha512-ppc.c2
3 files changed, 6 insertions, 6 deletions
diff --git a/cipher/chacha20-ppc.c b/cipher/chacha20-ppc.c
index 243c12ff..f135a32f 100644
--- a/cipher/chacha20-ppc.c
+++ b/cipher/chacha20-ppc.c
@@ -136,7 +136,7 @@ vec_add_ctr_u64(vector4x_u32 v, vector4x_u32 a)
#define ADD_U64(v,a) \
(v = vec_add_ctr_u64(v, a))
-static unsigned int ASM_FUNC_ATTR_INLINE
+static ASM_FUNC_ATTR_INLINE unsigned int
chacha20_ppc_blocks1(u32 *state, byte *dst, const byte *src, size_t nblks)
{
vector4x_u32 counter_1 = { 1, 0, 0, 0 };
@@ -282,7 +282,7 @@ chacha20_ppc_blocks1(u32 *state, byte *dst, const byte *src, size_t nblks)
PLUS(c1,d1); PLUS(c2,d2); XOR(b1,c1); XOR(b2,c2); \
ROTATE(b1, rotate_7); ROTATE(b2, rotate_7);
-static unsigned int ASM_FUNC_ATTR_INLINE
+static ASM_FUNC_ATTR_INLINE unsigned int
chacha20_ppc_blocks4(u32 *state, byte *dst, const byte *src, size_t nblks)
{
vector4x_u32 counters_0123 = { 0, 1, 2, 3 };
@@ -468,7 +468,7 @@ chacha20_ppc_blocks4(u32 *state, byte *dst, const byte *src, size_t nblks)
MUL_MOD_1305_64_PART2(h2, h1, h0, r1, r0, r1_mult5); \
} while (0)
-static unsigned int ASM_FUNC_ATTR_INLINE
+static ASM_FUNC_ATTR_INLINE unsigned int
chacha20_poly1305_ppc_blocks4(u32 *state, byte *dst, const byte *src,
size_t nblks, POLY1305_STATE *st,
const byte *poly1305_src)
@@ -641,7 +641,7 @@ chacha20_poly1305_ppc_blocks4(u32 *state, byte *dst, const byte *src,
#else
-static unsigned int ASM_FUNC_ATTR_INLINE
+static ASM_FUNC_ATTR_INLINE unsigned int
chacha20_poly1305_ppc_blocks4(u32 *state, byte *dst, const byte *src,
size_t nblks, POLY1305_STATE *st,
const byte *poly1305_src)
diff --git a/cipher/sha256-ppc.c b/cipher/sha256-ppc.c
index fd69380f..e5839a84 100644
--- a/cipher/sha256-ppc.c
+++ b/cipher/sha256-ppc.c
@@ -278,7 +278,7 @@ vec_u32_load_be(unsigned long offset, const void *ptr)
wlt1; \
})
-static unsigned int ASM_FUNC_ATTR ASM_FUNC_ATTR_INLINE FUNC_ATTR_OPT_O2
+static ASM_FUNC_ATTR_INLINE FUNC_ATTR_OPT_O2 unsigned int
sha256_transform_ppc(u32 state[8], const unsigned char *data, size_t nblks)
{
vector4x_u32 h0, h1, h2, h3, h4, h5, h6, h7;
diff --git a/cipher/sha512-ppc.c b/cipher/sha512-ppc.c
index 6e69ddb9..d213c241 100644
--- a/cipher/sha512-ppc.c
+++ b/cipher/sha512-ppc.c
@@ -339,7 +339,7 @@ vec_u64_load_be(unsigned long offset, const void *ptr)
wlt1; \
})
-static unsigned int ASM_FUNC_ATTR_INLINE FUNC_ATTR_OPT_O2
+static ASM_FUNC_ATTR_INLINE FUNC_ATTR_OPT_O2 unsigned int
sha512_transform_ppc(u64 state[8], const unsigned char *data, size_t nblks)
{
vector2x_u64 h0, h1, h2, h3, h4, h5, h6, h7;