diff options
author | dzwdz | 2023-02-23 18:31:23 +0100 |
---|---|---|
committer | dzwdz | 2023-02-23 18:31:23 +0100 |
commit | 55224307bf9b3e4231daca9ad4c4e3b6d734869b (patch) | |
tree | 18e0e3cc897efe60c96d3ee2ed02cb60a4571611 /src/shared | |
parent | c9daa8909313b020df57605d0bd50ac48b208d58 (diff) |
fix: printf related warnings
Diffstat (limited to 'src/shared')
-rw-r--r-- | src/shared/printf.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/shared/printf.c b/src/shared/printf.c index 5134048..514b73e 100644 --- a/src/shared/printf.c +++ b/src/shared/printf.c @@ -8,6 +8,7 @@ enum lenmod { LM_int, LM_long, LM_longlong, + LM_size, }; struct out_state { @@ -165,6 +166,10 @@ int __printf_internal(const char *fmt, va_list argp, c = *fmt++; } break; + case 'z': + lm = LM_size; + c = *fmt++; + break; default: lm = LM_int; break; @@ -198,6 +203,7 @@ int __printf_internal(const char *fmt, va_list argp, if (lm == LM_int) n = va_arg(argp, unsigned int); else if (lm == LM_long) n = va_arg(argp, unsigned long); else if (lm == LM_longlong) n = va_arg(argp, unsigned long long); + else if (lm == LM_size) n = va_arg(argp, size_t); output_uint16(&os, &m, n); break; @@ -205,6 +211,7 @@ int __printf_internal(const char *fmt, va_list argp, if (lm == LM_int) n = va_arg(argp, unsigned int); else if (lm == LM_long) n = va_arg(argp, unsigned long); else if (lm == LM_longlong) n = va_arg(argp, unsigned long long); + else if (lm == LM_size) n = va_arg(argp, size_t); output_uint(&os, &m, n, '\0'); break; @@ -213,6 +220,7 @@ int __printf_internal(const char *fmt, va_list argp, if (lm == LM_int) ns = va_arg(argp, int); else if (lm == LM_long) ns = va_arg(argp, long); else if (lm == LM_longlong) ns = va_arg(argp, long long); + else if (lm == LM_size) ns = va_arg(argp, size_t); sign = '\0'; if (ns < 0) { ns = -ns; |