aboutsummaryrefslogtreecommitdiffstats
path: root/win
diff options
context:
space:
mode:
authorPete Batard <pete@akeo.ie>2016-03-02 06:45:12 -0500
committerGene Cumm <gene.cumm@gmail.com>2016-03-09 06:33:58 -0500
commitb22a1fdc5458cffc08a387eccd5d30e7ed74a9bb (patch)
treedf7d33b036ed52b3123ceacd15152fec46b97310 /win
parent1ac927d131d088e07320942d29f65208c34f08c8 (diff)
downloadsyslinux-b22a1fdc5458cffc08a387eccd5d30e7ed74a9bb.tar.gz
syslinux-b22a1fdc5458cffc08a387eccd5d30e7ed74a9bb.tar.xz
syslinux-b22a1fdc5458cffc08a387eccd5d30e7ed74a9bb.zip
win/ntfs: remove unused variable and have ntfssect use char API calls
The variable 'ok' is never used and generates a warning. Remove it. Also ntfssect.c is designed to be compiled in non Unicode mode when using MSVC compilers, so remove all ambiguity about it (LPCTSTR -> LPCSTR, use of 'A' API calls) so that it doesn't break when compiled in Unicode mode, which is what Rufus uses with MSVC. Signed-off-by: Pete Batard <pete@akeo.ie>
Diffstat (limited to 'win')
-rw-r--r--win/ntfssect.c8
-rw-r--r--win/ntfssect.h4
2 files changed, 6 insertions, 6 deletions
diff --git a/win/ntfssect.c b/win/ntfssect.c
index 8c2bccaa..3dd6d7f0 100644
--- a/win/ntfssect.c
+++ b/win/ntfssect.c
@@ -45,7 +45,7 @@ DWORD M_NTFSSECT_API NtfsSectGetFileVcnExtent(
LARGE_INTEGER * Vcn,
S_NTFSSECT_EXTENT * Extent
) {
- BOOL bad, ok;
+ BOOL bad;
DWORD output_size, rc;
STARTING_VCN_INPUT_BUFFER input;
RETRIEVAL_POINTERS_BUFFER output;
@@ -60,7 +60,7 @@ DWORD M_NTFSSECT_API NtfsSectGetFileVcnExtent(
return ERROR_INVALID_PARAMETER;
input.StartingVcn = *Vcn;
- ok = DeviceIoControl(
+ DeviceIoControl(
File,
FSCTL_GET_RETRIEVAL_POINTERS,
&input,
@@ -112,7 +112,7 @@ static DWORD NtfsSectGetVolumeHandle(
c[-1] = 0;
/* Open the volume */
- VolumeInfo->Handle = CreateFile(
+ VolumeInfo->Handle = CreateFileA(
volname,
GENERIC_READ,
FILE_SHARE_READ | FILE_SHARE_WRITE,
@@ -302,7 +302,7 @@ DWORD M_NTFSSECT_API NtfsSectLoadXpFuncs(S_NTFSSECT_XPFUNCS * XpFuncs) {
XpFuncs->Size = sizeof *XpFuncs;
- XpFuncs->Kernel32 = LoadLibrary("kernel32.dll");
+ XpFuncs->Kernel32 = LoadLibraryA("kernel32.dll");
rc = GetLastError();
if (!XpFuncs->Kernel32) {
M_ERR("KERNEL32.DLL not found!");
diff --git a/win/ntfssect.h b/win/ntfssect.h
index 246c26da..f260af02 100644
--- a/win/ntfssect.h
+++ b/win/ntfssect.h
@@ -39,7 +39,7 @@ typedef struct S_NTFSSECT_XPFUNCS_ S_NTFSSECT_XPFUNCS;
/* The function type for Kernel32.dll's GetDiskFreeSpace() */
typedef BOOL WINAPI F_KERNEL32_GETDISKFREESPACE(
- LPCTSTR,
+ LPCSTR,
LPDWORD,
LPDWORD,
LPDWORD,
@@ -47,7 +47,7 @@ typedef BOOL WINAPI F_KERNEL32_GETDISKFREESPACE(
);
/* The function type for Kernel32.dll's GetVolumePathName() */
-typedef BOOL WINAPI F_KERNEL32_GETVOLUMEPATHNAME(LPCTSTR, LPCTSTR, DWORD);
+typedef BOOL WINAPI F_KERNEL32_GETVOLUMEPATHNAME(LPCSTR, LPCSTR, DWORD);
/*** Function declarations */