From d4c0091c054e6002ae092650c4ae3f40e6350119 Mon Sep 17 00:00:00 2001 From: "Evgeny Grin (Karlson2k)" Date: Sun, 26 Jan 2025 19:30:16 +0100 Subject: [PATCH] mhd_str: added function attributes for mhd_bin_to_hex{,_z}() --- src/mhd2/mhd_str.c | 6 ++++-- src/mhd2/mhd_str.h | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/mhd2/mhd_str.c b/src/mhd2/mhd_str.c index a8a3f107..610d23f9 100644 --- a/src/mhd2/mhd_str.c +++ b/src/mhd2/mhd_str.c @@ -1549,7 +1549,8 @@ mhd_uint8_to_str_pad (uint8_t val, } -MHD_INTERNAL size_t +MHD_INTERNAL MHD_FN_PAR_NONNULL_ALL_ +MHD_FN_PAR_IN_SIZE_ (1, 2) MHD_FN_PAR_OUT_ (3) size_t mhd_bin_to_hex (const void *restrict bin, size_t size, char *restrict hex) @@ -1569,7 +1570,8 @@ mhd_bin_to_hex (const void *restrict bin, } -MHD_INTERNAL size_t +MHD_INTERNAL MHD_FN_PAR_NONNULL_ALL_ +MHD_FN_PAR_IN_SIZE_ (1, 2) MHD_FN_PAR_OUT_ (3) size_t mhd_bin_to_hex_z (const void *restrict bin, size_t size, char *restrict hex) diff --git a/src/mhd2/mhd_str.h b/src/mhd2/mhd_str.h index 61cead3d..2705c73a 100644 --- a/src/mhd2/mhd_str.h +++ b/src/mhd2/mhd_str.h @@ -471,7 +471,8 @@ mhd_uint8_to_str_pad (uint8_t val, MHD_INTERNAL size_t mhd_bin_to_hex (const void *restrict bin, size_t size, - char *restrict hex); + char *restrict hex) +MHD_FN_PAR_NONNULL_ALL_ MHD_FN_PAR_IN_SIZE_ (1, 2) MHD_FN_PAR_OUT_ (3); /** * Convert @a size bytes from input binary data to lower case @@ -485,7 +486,8 @@ mhd_bin_to_hex (const void *restrict bin, MHD_INTERNAL size_t mhd_bin_to_hex_z (const void *restrict bin, size_t size, - char *restrict hex); + char *restrict hex) +MHD_FN_PAR_NONNULL_ALL_ MHD_FN_PAR_IN_SIZE_ (1, 2) MHD_FN_PAR_OUT_ (3); /** * Convert hexadecimal digits to binary data.