Fixing VC++ warnings and errors.
This commit is contained in:
@@ -88,8 +88,13 @@ Entry* LocalDirectoryDevice::ResolvePath(const char* path) {
|
||||
XELOGFS(XT("LocalDirectoryDevice::ResolvePath(%s)"), path);
|
||||
|
||||
xechar_t full_path[XE_MAX_PATH];
|
||||
#if XE_WCHAR
|
||||
xesnprintf(full_path, XECOUNT(full_path), XT("%ls%c%hs"),
|
||||
local_path_, XE_PATH_SEPARATOR, path);
|
||||
#else
|
||||
xesnprintf(full_path, XECOUNT(full_path), XT("%s%c%s"),
|
||||
local_path_, XE_PATH_SEPARATOR, path);
|
||||
#endif // XE_WCHAR
|
||||
|
||||
// Swap around path separators.
|
||||
if (XE_PATH_SEPARATOR != '\\') {
|
||||
|
||||
@@ -87,6 +87,7 @@ X_STATUS XModule::LoadFromFile(const char* path) {
|
||||
X_STATUS XModule::LoadFromMemory(const void* addr, const size_t length) {
|
||||
// Load the XEX into memory and decrypt.
|
||||
xe_xex2_options_t xex_options;
|
||||
xe_zero_struct(&xex_options, sizeof(xex_options));
|
||||
xex_ = xe_xex2_load(kernel_state()->memory(), addr, length, xex_options);
|
||||
XEEXPECTNOTNULL(xex_);
|
||||
|
||||
|
||||
@@ -141,8 +141,6 @@ static uint32_t __stdcall XThreadStartCallbackWin32(void* param) {
|
||||
}
|
||||
|
||||
X_STATUS XThread::PlatformCreate() {
|
||||
XEASSERTALWAYS();
|
||||
|
||||
thread_handle_ = CreateThread(
|
||||
NULL,
|
||||
creation_params_.stack_size,
|
||||
@@ -235,7 +233,7 @@ void XThread::Execute() {
|
||||
}
|
||||
|
||||
// Run user code.
|
||||
int exit_code = kernel_state()->processor()->Execute(
|
||||
int exit_code = (int)kernel_state()->processor()->Execute(
|
||||
processor_state_,
|
||||
creation_params_.start_address, creation_params_.start_context);
|
||||
|
||||
|
||||
@@ -40,9 +40,9 @@ class PESection {
|
||||
public:
|
||||
char name[9]; // 8 + 1 for \0
|
||||
uint32_t raw_address;
|
||||
size_t raw_size;
|
||||
uint32_t raw_size;
|
||||
uint32_t address;
|
||||
size_t size;
|
||||
uint32_t size;
|
||||
uint32_t flags; // kXEPESection*
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user