aboutsummaryrefslogtreecommitdiff
path: root/C/Util/7z/7zMain.c
diff options
context:
space:
mode:
Diffstat (limited to 'C/Util/7z/7zMain.c')
-rw-r--r--C/Util/7z/7zMain.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/C/Util/7z/7zMain.c b/C/Util/7z/7zMain.c
index 3e86076..1c02b48 100644
--- a/C/Util/7z/7zMain.c
+++ b/C/Util/7z/7zMain.c
@@ -1,5 +1,5 @@
/* 7zMain.c - Test application for 7z Decoder
-2018-08-04 : Igor Pavlov : Public domain */
+2019-02-02 : Igor Pavlov : Public domain */
#include "Precomp.h"
@@ -176,7 +176,7 @@ static SRes Utf16_To_Char(CBuf *buf, const UInt16 *s
char defaultChar = '_';
BOOL defUsed;
unsigned numChars = 0;
- numChars = WideCharToMultiByte(codePage, 0, s, len, (char *)buf->data, size, &defaultChar, &defUsed);
+ numChars = WideCharToMultiByte(codePage, 0, (LPCWSTR)s, len, (char *)buf->data, size, &defaultChar, &defUsed);
if (numChars == 0 || numChars >= size)
return SZ_ERROR_FAIL;
buf->data[numChars] = 0;
@@ -202,7 +202,7 @@ static WRes MyCreateDir(const UInt16 *name)
{
#ifdef USE_WINDOWS_FILE
- return CreateDirectoryW(name, NULL) ? 0 : GetLastError();
+ return CreateDirectoryW((LPCWSTR)name, NULL) ? 0 : GetLastError();
#else
@@ -227,7 +227,7 @@ static WRes MyCreateDir(const UInt16 *name)
static WRes OutFile_OpenUtf16(CSzFile *p, const UInt16 *name)
{
#ifdef USE_WINDOWS_FILE
- return OutFile_OpenW(p, name);
+ return OutFile_OpenW(p, (LPCWSTR)name);
#else
CBuf buf;
WRes res;
@@ -430,7 +430,7 @@ int MY_CDECL main(int numargs, char *args[])
res = SZ_OK;
{
- lookStream.buf = ISzAlloc_Alloc(&allocImp, kInputBufSize);
+ lookStream.buf = (Byte *)ISzAlloc_Alloc(&allocImp, kInputBufSize);
if (!lookStream.buf)
res = SZ_ERROR_MEM;
else
@@ -647,7 +647,7 @@ int MY_CDECL main(int numargs, char *args[])
We remove posix bits, if we detect posix mode field */
if ((attrib & 0xF0000000) != 0)
attrib &= 0x7FFF;
- SetFileAttributesW(destPath, attrib);
+ SetFileAttributesW((LPCWSTR)destPath, attrib);
}
#endif
}