1717#ifdef MBED_MINIMAL_PRINTF
1818
1919#include "mbed_printf_implementation.h"
20+ #include "mbed_toolchain.h"
2021
2122#include <limits.h>
2223
6061#warning "This compiler is not yet supported."
6162#endif
6263
63- int SUB_PRINTF (const char * format , ...)
64+ MBED_USED int SUB_PRINTF (const char * format , ...)
6465{
6566 va_list arguments ;
6667 va_start (arguments , format );
@@ -70,7 +71,7 @@ int SUB_PRINTF(const char *format, ...)
7071 return result ;
7172}
7273
73- int SUB_SPRINTF (char * buffer , const char * format , ...)
74+ MBED_USED int SUB_SPRINTF (char * buffer , const char * format , ...)
7475{
7576 va_list arguments ;
7677 va_start (arguments , format );
@@ -80,7 +81,7 @@ int SUB_SPRINTF(char *buffer, const char *format, ...)
8081 return result ;
8182}
8283
83- int SUB_SNPRINTF (char * buffer , size_t length , const char * format , ...)
84+ MBED_USED int SUB_SNPRINTF (char * buffer , size_t length , const char * format , ...)
8485{
8586 va_list arguments ;
8687 va_start (arguments , format );
@@ -90,22 +91,22 @@ int SUB_SNPRINTF(char *buffer, size_t length, const char *format, ...)
9091 return result ;
9192}
9293
93- int SUB_VPRINTF (const char * format , va_list arguments )
94+ MBED_USED int SUB_VPRINTF (const char * format , va_list arguments )
9495{
9596 return mbed_minimal_formatted_string (NULL , LONG_MAX , format , arguments , stdout );
9697}
9798
98- int SUB_VSPRINTF (char * buffer , const char * format , va_list arguments )
99+ MBED_USED int SUB_VSPRINTF (char * buffer , const char * format , va_list arguments )
99100{
100101 return mbed_minimal_formatted_string (buffer , LONG_MAX , format , arguments , NULL );
101102}
102103
103- int SUB_VSNPRINTF (char * buffer , size_t length , const char * format , va_list arguments )
104+ MBED_USED int SUB_VSNPRINTF (char * buffer , size_t length , const char * format , va_list arguments )
104105{
105106 return mbed_minimal_formatted_string (buffer , length , format , arguments , NULL );
106107}
107108
108- int SUB_FPRINTF (FILE * stream , const char * format , ...)
109+ MBED_USED int SUB_FPRINTF (FILE * stream , const char * format , ...)
109110{
110111 va_list arguments ;
111112 va_start (arguments , format );
@@ -115,7 +116,7 @@ int SUB_FPRINTF(FILE *stream, const char *format, ...)
115116 return result ;
116117}
117118
118- int SUB_VFPRINTF (FILE * stream , const char * format , va_list arguments )
119+ MBED_USED int SUB_VFPRINTF (FILE * stream , const char * format , va_list arguments )
119120{
120121 return mbed_minimal_formatted_string (NULL , LONG_MAX , format , arguments , stream );
121122}
0 commit comments