From 6461d782de0a2fd500e126a44a9701d903718023 Mon Sep 17 00:00:00 2001 From: Kjetil Osteras Date: Fri, 12 Apr 2019 22:50:46 +0200 Subject: [PATCH 1/2] Including stddef.h instead of sys/types.h for size_t --- tinyprintf.c | 2 +- tinyprintf.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tinyprintf.c b/tinyprintf.c index bb22700..26fc0e7 100644 --- a/tinyprintf.c +++ b/tinyprintf.c @@ -39,7 +39,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * Configuration adjustments */ #ifdef PRINTF_SIZE_T_SUPPORT -#include +#include #endif #ifdef PRINTF_LONG_LONG_SUPPORT diff --git a/tinyprintf.h b/tinyprintf.h index a769f4a..a7a7c38 100644 --- a/tinyprintf.h +++ b/tinyprintf.h @@ -126,7 +126,7 @@ regs Kusti, 23.10.2004 /* Optional external types dependencies */ #if TINYPRINTF_DEFINE_TFP_SPRINTF -# include /* size_t */ +# include /* size_t */ #endif /* Declarations */ From 8f5a22274f01b9ee176c872c64e6ba3199b4f45e Mon Sep 17 00:00:00 2001 From: Kjetil Osteras Date: Fri, 12 Apr 2019 23:05:30 +0200 Subject: [PATCH 2/2] Adding fallthrough comment to silence gcc warning --- tinyprintf.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tinyprintf.c b/tinyprintf.c index 26fc0e7..506f23d 100644 --- a/tinyprintf.c +++ b/tinyprintf.c @@ -380,6 +380,7 @@ void tfp_format(void *putp, putcf putf, const char *fmt, va_list va) lng = 2; # endif #endif + //-fallthrough case 'x': case 'X': p.base = 16;