[FL-2870] Printf function attributes (#1841)

* Furi strings: printf attribute
* Logs: printf attribute
* Plugins: adapt
* Plugins: accommodate
* Unit tests: accommodate

Co-authored-by: あく <alleteam@gmail.com>
This commit is contained in:
Sergey Gavrilov
2022-10-07 23:35:15 +10:00
committed by GitHub
parent 1f742b611a
commit 4000f0cac5
78 changed files with 187 additions and 156 deletions

View File

@@ -143,7 +143,8 @@ size_t stream_write_cstring(Stream* stream, const char* string);
* @param ...
* @return size_t how many bytes was written
*/
size_t stream_write_format(Stream* stream, const char* format, ...);
size_t stream_write_format(Stream* stream, const char* format, ...)
_ATTRIBUTE((__format__(__printf__, 2, 3)));
/**
* Write formatted string to the stream, va_list version
@@ -200,7 +201,8 @@ bool stream_insert_cstring(Stream* stream, const char* string);
* @return true if the operation was successful
* @return false on error
*/
bool stream_insert_format(Stream* stream, const char* format, ...);
bool stream_insert_format(Stream* stream, const char* format, ...)
_ATTRIBUTE((__format__(__printf__, 2, 3)));
/**
* Insert formatted string to the stream, va_list version
@@ -251,7 +253,8 @@ bool stream_delete_and_insert_cstring(Stream* stream, size_t delete_size, const
* @return true if the operation was successful
* @return false on error
*/
bool stream_delete_and_insert_format(Stream* stream, size_t delete_size, const char* format, ...);
bool stream_delete_and_insert_format(Stream* stream, size_t delete_size, const char* format, ...)
_ATTRIBUTE((__format__(__printf__, 3, 4)));
/**
* Delete N chars from the stream and insert formatted string to the stream, va_list version