mirror of
https://gitlab.com/sortix/sortix.git
synced 2023-02-13 20:55:38 -05:00
Fix printf checking of print_string utility functions.
This commit is contained in:
parent
e001dca46b
commit
53f20c5519
3 changed files with 7 additions and 3 deletions
|
@ -62,9 +62,10 @@ char* read_single_line(FILE* fp)
|
|||
return ret;
|
||||
}
|
||||
|
||||
__attribute__((format(printf, 1, 2)))
|
||||
char* print_string(const char* format, ...)
|
||||
{
|
||||
char* ret = NULL;
|
||||
char* ret;
|
||||
va_list ap;
|
||||
va_start(ap, format);
|
||||
int status = vasprintf(&ret, format, ap);
|
||||
|
|
|
@ -369,6 +369,7 @@ bool dictionary_append_file_path(string_array_t* sa, const char* path)
|
|||
return true;
|
||||
}
|
||||
|
||||
__attribute__((format(printf, 1, 2)))
|
||||
char* print_string(const char* format, ...)
|
||||
{
|
||||
va_list ap;
|
||||
|
|
|
@ -60,12 +60,14 @@ bool use_runes = false;
|
|||
bool configured_use_runes = false;
|
||||
uint8_t font[FONT_CHARSIZE * FONT_NUMCHARS];
|
||||
|
||||
__attribute__((format(printf, 1, 2)))
|
||||
char* print_string(const char* format, ...)
|
||||
{
|
||||
char* ret = NULL;
|
||||
char* ret;
|
||||
va_list ap;
|
||||
va_start(ap, format);
|
||||
vasprintf(&ret, format, ap);
|
||||
if ( vasprintf(&ret, format, ap) < 0 )
|
||||
ret = NULL;
|
||||
va_end(ap);
|
||||
return ret;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue