mirror of
https://github.com/cesanta/mongoose.git
synced 2026-11-18 19:31:02 +00:00
squash mingw variable set but not used warning
This commit is contained in:
1 parent
d3c02331d4
commit
a2239c2b4b
1 file changed
+1
-4
+1
-4
@@ -1018,14 +1018,11 @@ static void change_slashes_to_backslashes(char *path) {
|
|||||||
// Encode 'path' which is assumed UTF-8 string, into UNICODE string.
|
// Encode 'path' which is assumed UTF-8 string, into UNICODE string.
|
||||||
// wbuf and wbuf_len is a target buffer and its length.
|
// wbuf and wbuf_len is a target buffer and its length.
|
||||||
static void to_unicode(const char *path, wchar_t *wbuf, size_t wbuf_len) {
|
static void to_unicode(const char *path, wchar_t *wbuf, size_t wbuf_len) {
|
||||||
char buf[PATH_MAX], buf2[PATH_MAX], *p;
|
char buf[PATH_MAX], buf2[PATH_MAX];
|
||||||
|
|
||||||
mg_strlcpy(buf, path, sizeof(buf));
|
mg_strlcpy(buf, path, sizeof(buf));
|
||||||
change_slashes_to_backslashes(buf);
|
change_slashes_to_backslashes(buf);
|
||||||
|
|
||||||
// Point p to the end of the file name
|
|
||||||
p = buf + strlen(buf) - 1;
|
|
||||||
|
|
||||||
// Convert to Unicode and back. If doubly-converted string does not
|
// Convert to Unicode and back. If doubly-converted string does not
|
||||||
// match the original, something is fishy, reject.
|
// match the original, something is fishy, reject.
|
||||||
memset(wbuf, 0, wbuf_len * sizeof(wchar_t));
|
memset(wbuf, 0, wbuf_len * sizeof(wchar_t));
|
||||||
|
|||||||
Reference in new issue
Block a user