Less warnings compiling web client

This commit is contained in:
UnknownShadow200 2020-07-20 21:41:35 +10:00
parent b707fef2c8
commit 81bbc6d3a7
3 changed files with 4 additions and 4 deletions

View File

@ -341,7 +341,7 @@ static void Http_UpdateProgress(emscripten_fetch_t* fetch) {
static void Http_FinishedAsync(emscripten_fetch_t* fetch) {
struct HttpRequest* req = &http_curRequest;
req->data = fetch->data;
req->data = (cc_uint8*)fetch->data;
req->size = fetch->numBytes;
req->statusCode = fetch->status;
req->contentLength = fetch->totalBytes;
@ -376,7 +376,7 @@ static void Http_DownloadAsync(struct HttpRequest* req) {
}
if (req->requestType == REQUEST_TYPE_POST) {
attr.requestData = req->data;
attr.requestData = (const char*)req->data;
attr.requestDataSize = req->size;
}

View File

@ -44,7 +44,7 @@ struct LWebTask {
cc_bool completed; /* Whether the task has finished executing. */
cc_bool working; /* Whether the task is currently in progress, or is scheduled to be. */
cc_bool success; /* Whether the task completed successfully. */
cc_result res; /* Error returned (e.g. for DNS failure) */
cc_result res; /* Error returned (e.g. for DNS failure) */
int status; /* HTTP return code for the request */
String identifier; /* Unique identifier for this web task. */

View File

@ -3337,7 +3337,7 @@ void Window_Init(void) {
/* Paste text (window.clipboardData is handled in Clipboard_RequestText instead) */
EM_ASM(window.addEventListener('paste',
function(e) {
var contents = e.clipboardData ? e.clipboardData.getData('text/plain') : '';
var contents = e.clipboardData ? e.clipboardData.getData('text/plain') : "";
ccall('Window_GotClipboardText', 'void', ['string'], [contents]);
});
);