Relax ((nonnull)) attributes where applicable

Reported by @stef -- Thanks!

Fixes #1477
This commit is contained in:
Frank Denis
2025-09-12 23:07:20 +02:00
parent 800410cfe7
commit 09e995c0c8
7 changed files with 13 additions and 13 deletions

View File

@@ -46,7 +46,7 @@ SODIUM_EXPORT
int crypto_stream_xor(unsigned char *c, const unsigned char *m,
unsigned long long mlen, const unsigned char *n,
const unsigned char *k)
__attribute__ ((nonnull));
__attribute__ ((nonnull(1, 4, 5)));
SODIUM_EXPORT
void crypto_stream_keygen(unsigned char k[crypto_stream_KEYBYTES])

View File

@@ -43,14 +43,14 @@ SODIUM_EXPORT
int crypto_stream_chacha20_xor(unsigned char *c, const unsigned char *m,
unsigned long long mlen, const unsigned char *n,
const unsigned char *k)
__attribute__ ((nonnull));
__attribute__ ((nonnull(1, 4, 5)));
SODIUM_EXPORT
int crypto_stream_chacha20_xor_ic(unsigned char *c, const unsigned char *m,
unsigned long long mlen,
const unsigned char *n, uint64_t ic,
const unsigned char *k)
__attribute__ ((nonnull));
__attribute__ ((nonnull(1, 4, 6)));
SODIUM_EXPORT
void crypto_stream_chacha20_keygen(unsigned char k[crypto_stream_chacha20_KEYBYTES])
@@ -80,14 +80,14 @@ SODIUM_EXPORT
int crypto_stream_chacha20_ietf_xor(unsigned char *c, const unsigned char *m,
unsigned long long mlen, const unsigned char *n,
const unsigned char *k)
__attribute__ ((nonnull));
__attribute__ ((nonnull(1, 4, 5)));
SODIUM_EXPORT
int crypto_stream_chacha20_ietf_xor_ic(unsigned char *c, const unsigned char *m,
unsigned long long mlen,
const unsigned char *n, uint32_t ic,
const unsigned char *k)
__attribute__ ((nonnull));
__attribute__ ((nonnull(1, 4, 6)));
SODIUM_EXPORT
void crypto_stream_chacha20_ietf_keygen(unsigned char k[crypto_stream_chacha20_ietf_KEYBYTES])

View File

@@ -41,14 +41,14 @@ SODIUM_EXPORT
int crypto_stream_salsa20_xor(unsigned char *c, const unsigned char *m,
unsigned long long mlen, const unsigned char *n,
const unsigned char *k)
__attribute__ ((nonnull));
__attribute__ ((nonnull(1, 4, 5)));
SODIUM_EXPORT
int crypto_stream_salsa20_xor_ic(unsigned char *c, const unsigned char *m,
unsigned long long mlen,
const unsigned char *n, uint64_t ic,
const unsigned char *k)
__attribute__ ((nonnull));
__attribute__ ((nonnull(1, 4, 6)));
SODIUM_EXPORT
void crypto_stream_salsa20_keygen(unsigned char k[crypto_stream_salsa20_KEYBYTES])

View File

@@ -40,7 +40,7 @@ SODIUM_EXPORT
int crypto_stream_salsa2012_xor(unsigned char *c, const unsigned char *m,
unsigned long long mlen, const unsigned char *n,
const unsigned char *k)
__attribute__ ((nonnull));
__attribute__ ((nonnull(1, 4, 5)));
SODIUM_EXPORT
void crypto_stream_salsa2012_keygen(unsigned char k[crypto_stream_salsa2012_KEYBYTES])

View File

@@ -43,7 +43,7 @@ SODIUM_EXPORT
int crypto_stream_salsa208_xor(unsigned char *c, const unsigned char *m,
unsigned long long mlen, const unsigned char *n,
const unsigned char *k)
__attribute__ ((deprecated)) __attribute__ ((nonnull));
__attribute__ ((deprecated)) __attribute__ ((nonnull(1, 4, 5)));
SODIUM_EXPORT
void crypto_stream_salsa208_keygen(unsigned char k[crypto_stream_salsa208_KEYBYTES])

View File

@@ -41,14 +41,14 @@ SODIUM_EXPORT
int crypto_stream_xchacha20_xor(unsigned char *c, const unsigned char *m,
unsigned long long mlen, const unsigned char *n,
const unsigned char *k)
__attribute__ ((nonnull));
__attribute__ ((nonnull(1, 4, 5)));
SODIUM_EXPORT
int crypto_stream_xchacha20_xor_ic(unsigned char *c, const unsigned char *m,
unsigned long long mlen,
const unsigned char *n, uint64_t ic,
const unsigned char *k)
__attribute__ ((nonnull));
__attribute__ ((nonnull(1, 4, 6)));
SODIUM_EXPORT
void crypto_stream_xchacha20_keygen(unsigned char k[crypto_stream_xchacha20_KEYBYTES])

View File

@@ -41,14 +41,14 @@ SODIUM_EXPORT
int crypto_stream_xsalsa20_xor(unsigned char *c, const unsigned char *m,
unsigned long long mlen, const unsigned char *n,
const unsigned char *k)
__attribute__ ((nonnull));
__attribute__ ((nonnull(1, 4, 5)));
SODIUM_EXPORT
int crypto_stream_xsalsa20_xor_ic(unsigned char *c, const unsigned char *m,
unsigned long long mlen,
const unsigned char *n, uint64_t ic,
const unsigned char *k)
__attribute__ ((nonnull));
__attribute__ ((nonnull(1, 4, 6)));
SODIUM_EXPORT
void crypto_stream_xsalsa20_keygen(unsigned char k[crypto_stream_xsalsa20_KEYBYTES])