From 73e89bffcc67143fff86e89fe3c376f0d49e560a Mon Sep 17 00:00:00 2001 From: Armin Novak Date: Wed, 19 Apr 2017 08:27:22 +0200 Subject: [PATCH] Cleaned up includes. --- channels/drive/client/drive_file.c | 18 ++---------------- channels/drive/client/drive_file.h | 3 +-- channels/drive/client/drive_main.c | 11 ++--------- 3 files changed, 5 insertions(+), 27 deletions(-) diff --git a/channels/drive/client/drive_file.c b/channels/drive/client/drive_file.c index 5e3614a0b..036bb29df 100644 --- a/channels/drive/client/drive_file.c +++ b/channels/drive/client/drive_file.c @@ -29,20 +29,11 @@ #include "config.h" #endif -#ifndef _WIN32 -#define __USE_LARGEFILE64 -#define _LARGEFILE_SOURCE -#define _LARGEFILE64_SOURCE - -#include -#endif - #include #include #include #include #include -#include #include #include @@ -54,18 +45,12 @@ #include "drive_file.h" -#ifdef _WIN32 -#pragma warning(push) -#pragma warning(disable: 4244) -#endif - #ifdef WITH_DEBUG_RDPDR #define DEBUG_WSTR(msg, wstr) do { LPSTR lpstr; ConvertFromUnicode(CP_UTF8, 0, wstr, -1, &lpstr, 0, NULL, NULL); WLog_DBG(TAG, msg, lpstr); free(lpstr); } while (0) #else #define DEBUG_WSTR(msg, wstr) do { } while (0) #endif - static void drive_file_fix_path(WCHAR* path) { int i; @@ -630,7 +615,8 @@ BOOL drive_file_set_information(DRIVE_FILE* file, UINT32 FsInformationClass, UIN if (file->file_handle == INVALID_HANDLE_VALUE) { - WLog_ERR(TAG, "Unable to truncate %s to %"PRId64" (%"PRId32")", file->fullpath, size, GetLastError()); + WLog_ERR(TAG, "Unable to truncate %s to %"PRId64" (%"PRId32")", file->fullpath, size, + GetLastError()); return FALSE; } diff --git a/channels/drive/client/drive_file.h b/channels/drive/client/drive_file.h index 1cdfb3353..3cc914562 100644 --- a/channels/drive/client/drive_file.h +++ b/channels/drive/client/drive_file.h @@ -26,8 +26,7 @@ #ifndef FREERDP_CHANNEL_DRIVE_FILE_H #define FREERDP_CHANNEL_DRIVE_FILE_H -#include -#include +#include #include #define TAG CHANNELS_TAG("drive.client") diff --git a/channels/drive/client/drive_main.c b/channels/drive/client/drive_main.c index 827244698..97a27323c 100644 --- a/channels/drive/client/drive_main.c +++ b/channels/drive/client/drive_main.c @@ -25,14 +25,6 @@ #include "config.h" #endif -#ifndef _WIN32 -#define __USE_LARGEFILE64 -#define _LARGEFILE_SOURCE -#define _LARGEFILE64_SOURCE - -#include -#endif - #include #include #include @@ -423,6 +415,7 @@ static UINT drive_process_irp_query_volume_information(DRIVE_DEVICE* drive, switch (FsInformationClass) { case FileFsVolumeInformation: + /* http://msdn.microsoft.com/en-us/library/cc232108.aspx */ if ((length = ConvertToUnicode(sys_code_page, 0, volumeLabel, -1, &outStr, 0) * 2) <= 0) { @@ -467,6 +460,7 @@ static UINT drive_process_irp_query_volume_information(DRIVE_DEVICE* drive, break; case FileFsAttributeInformation: + /* http://msdn.microsoft.com/en-us/library/cc232101.aspx */ if ((length = ConvertToUnicode(sys_code_page, 0, diskType, -1, &outStr, 0) * 2) <= 0) { @@ -564,7 +558,6 @@ static UINT drive_process_irp_query_directory(DRIVE_DEVICE* drive, IRP* irp) Stream_Read_UINT8(irp->input, InitialQuery); Stream_Read_UINT32(irp->input, PathLength); Stream_Seek(irp->input, 23); /* Padding */ - path = (WCHAR*) Stream_Pointer(irp->input); file = drive_get_file_by_id(drive, irp->FileId);