C++: Actually it's more appropriate to remove the implementation of vswprintf.

This commit is contained in:
Geoffrey White
2021-02-02 13:28:03 +00:00
parent 4e904dd87d
commit 708d3870ee
3 changed files with 16 additions and 9 deletions

View File

@@ -1,3 +1,3 @@
| printf.cpp:24:31:24:37 | test | This argument should be of type 'char *' but is of type 'char16_t *' |
| printf.cpp:36:29:36:35 | test | This argument should be of type 'char *' but is of type 'char16_t *' |
| printf.cpp:43:29:43:35 | test | This argument should be of type 'char16_t *' but is of type 'wchar_t *' |
| printf.cpp:31:31:31:37 | test | This argument should be of type 'char *' but is of type 'char16_t *' |
| printf.cpp:43:29:43:35 | test | This argument should be of type 'char *' but is of type 'char16_t *' |
| printf.cpp:50:29:50:35 | test | This argument should be of type 'char16_t *' but is of type 'wchar_t *' |

View File

@@ -1,2 +1,2 @@
| printf.cpp:15:5:15:12 | swprintf | char | char16_t | char16_t |
| printf.cpp:17:5:17:11 | sprintf | char | char16_t | char16_t |
| printf.cpp:13:5:13:12 | swprintf | char | char16_t | char16_t |
| printf.cpp:24:5:24:11 | sprintf | char | char16_t | char16_t |

View File

@@ -8,11 +8,18 @@ typedef void *va_list;
#define va_start(va, other)
#define va_end(args)
int vswprintf(WCHAR *dest, WCHAR *format, va_list args) {
return 0;
}
int vswprintf(WCHAR *dest, WCHAR *format, va_list args);
int swprintf(WCHAR *dest, WCHAR *format, ...);
int swprintf(WCHAR *dest, WCHAR *format, ...) {
va_list args;
va_start(args, format);
int ret = vswprintf(dest, format, args);
va_end(args);
return ret;
}
int sprintf(char *dest, char *format, ...);