mirror of
https://github.com/Ylianst/MeshAgent
synced 2025-12-16 00:03:45 +00:00
Fixed some warnings
This commit is contained in:
@@ -235,8 +235,8 @@ ILibTransport_DoneState ILibDuktape_deCompressor_Write(ILibDuktape_DuplexStream
|
|||||||
duk_push_heapptr(cs->ctx, cs->object); // [stream]
|
duk_push_heapptr(cs->ctx, cs->object); // [stream]
|
||||||
if (cs->Z.avail_in > 0)
|
if (cs->Z.avail_in > 0)
|
||||||
{
|
{
|
||||||
char *tmp = Duktape_PushBuffer(cs->ctx, cs->Z.avail_in); // [stream][buffer]
|
char *tmp2 = Duktape_PushBuffer(cs->ctx, cs->Z.avail_in); // [stream][buffer]
|
||||||
memcpy_s(tmp, ILibMemory_Size(tmp), cs->Z.next_in, ILibMemory_Size(tmp));
|
memcpy_s(tmp2, ILibMemory_Size(tmp2), cs->Z.next_in, ILibMemory_Size(tmp2));
|
||||||
duk_put_prop_string(cs->ctx, -2, ILibDuktape_CompressorStream_ResumeBuffer);// [stream]
|
duk_put_prop_string(cs->ctx, -2, ILibDuktape_CompressorStream_ResumeBuffer);// [stream]
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -1579,7 +1579,7 @@ duk_ret_t ILibDuktape_ScriptContainer_OS_arch(duk_context *ctx)
|
|||||||
|
|
||||||
if (func != NULL)
|
if (func != NULL)
|
||||||
{
|
{
|
||||||
BOOL isWow = FALSE;
|
isWow = FALSE;
|
||||||
BOOL result = ((BOOL(__stdcall *)(HANDLE, BOOL*))func)(GetCurrentProcess(), &isWow);
|
BOOL result = ((BOOL(__stdcall *)(HANDLE, BOOL*))func)(GetCurrentProcess(), &isWow);
|
||||||
if (result)
|
if (result)
|
||||||
{
|
{
|
||||||
@@ -3518,7 +3518,7 @@ void ILibDuktape_ScriptContainer_NonIsolatedWorker_ProcessAsSlave(void *chain, v
|
|||||||
ILibDuktape_SetNativeUncaughtExceptionHandler(slave->ctx, ILibDuktape_ScriptContainer_NonIsolatedWorker_ExceptionSink, master);
|
ILibDuktape_SetNativeUncaughtExceptionHandler(slave->ctx, ILibDuktape_ScriptContainer_NonIsolatedWorker_ExceptionSink, master);
|
||||||
|
|
||||||
char json[] = "{\"command\": \"1\"}";
|
char json[] = "{\"command\": \"1\"}";
|
||||||
ILibDuktape_ScriptContainer_NonIsolated_Command* cmd = (ILibDuktape_ScriptContainer_NonIsolated_Command*)ILibMemory_Allocate(sizeof(json) + sizeof(ILibDuktape_ScriptContainer_NonIsolated_Command), 0, NULL, NULL);
|
cmd = (ILibDuktape_ScriptContainer_NonIsolated_Command*)ILibMemory_Allocate(sizeof(json) + sizeof(ILibDuktape_ScriptContainer_NonIsolated_Command), 0, NULL, NULL);
|
||||||
cmd->container.master = master;
|
cmd->container.master = master;
|
||||||
memcpy_s(cmd->json, sizeof(json), json, sizeof(json));
|
memcpy_s(cmd->json, sizeof(json), json, sizeof(json));
|
||||||
Duktape_RunOnEventLoopEx(master->chain, duk_ctx_nonce(master->ctx), master->ctx, ILibDuktape_ScriptContainer_NonIsolatedWorker_ProcessAsMaster, cmd, 1);
|
Duktape_RunOnEventLoopEx(master->chain, duk_ctx_nonce(master->ctx), master->ctx, ILibDuktape_ScriptContainer_NonIsolatedWorker_ProcessAsMaster, cmd, 1);
|
||||||
|
|||||||
@@ -984,7 +984,7 @@ BOOL ILibDuktape_server_ipc_WriteSink(void *chain, HANDLE h, ILibWaitHandle_Erro
|
|||||||
duk_size_t bufLen;
|
duk_size_t bufLen;
|
||||||
char *buf;
|
char *buf;
|
||||||
ILibTransport_DoneState d = ILibTransport_DoneState_COMPLETE;
|
ILibTransport_DoneState d = ILibTransport_DoneState_COMPLETE;
|
||||||
BOOL ret;
|
BOOL ret = FALSE;
|
||||||
|
|
||||||
duk_push_heapptr(winIPC->ctx, winIPC->mSocket); // [obj]
|
duk_push_heapptr(winIPC->ctx, winIPC->mSocket); // [obj]
|
||||||
duk_get_prop_string(winIPC->ctx, -1, ILibDuktape_net_WindowsIPC_PendingArray); // [obj][array]
|
duk_get_prop_string(winIPC->ctx, -1, ILibDuktape_net_WindowsIPC_PendingArray); // [obj][array]
|
||||||
|
|||||||
@@ -854,7 +854,6 @@ __EXPORT_TYPE int ILibSimpleDataStore_GetEx(ILibSimpleDataStore dataStore, char*
|
|||||||
if (buffer == NULL) { return((int)tmplen); }
|
if (buffer == NULL) { return((int)tmplen); }
|
||||||
|
|
||||||
// Before we return, we need to check the HASH of the uncompressed data
|
// Before we return, we need to check the HASH of the uncompressed data
|
||||||
char hash[SHA384HASHSIZE];
|
|
||||||
ILibSimpleDataStore_SHA384(buffer, (int)tmplen, hash);
|
ILibSimpleDataStore_SHA384(buffer, (int)tmplen, hash);
|
||||||
if (memcmp(hash, entry->valueHash, SHA384HASHSIZE) == 0)
|
if (memcmp(hash, entry->valueHash, SHA384HASHSIZE) == 0)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user