diff options
author | Pete Batard <pete@akeo.ie> | 2016-03-02 06:45:12 -0500 |
---|---|---|
committer | Gene Cumm <gene.cumm@gmail.com> | 2016-03-09 06:33:58 -0500 |
commit | b22a1fdc5458cffc08a387eccd5d30e7ed74a9bb (patch) | |
tree | df7d33b036ed52b3123ceacd15152fec46b97310 /win/ntfssect.c | |
parent | 1ac927d131d088e07320942d29f65208c34f08c8 (diff) | |
download | syslinux-b22a1fdc5458cffc08a387eccd5d30e7ed74a9bb.tar.gz |
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/ntfssect.c')
-rw-r--r-- | win/ntfssect.c | 8 |
1 files changed, 4 insertions, 4 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!"); |