fix compiler warnings
This commit is contained in:
@@ -146,7 +146,6 @@ static JSValue js_enet_host_service(JSContext *ctx, JSValueConst this_val, int a
|
||||
if (!host) return JS_EXCEPTION;
|
||||
|
||||
if (argc < 1 || !JS_IsFunction(argv[0])) return JS_RaiseDisrupt(ctx, "Expected a callback function as first argument");
|
||||
JSValue callback = JS_DupValue(ctx, argv[0]);
|
||||
|
||||
double secs;
|
||||
JS_ToFloat64(ctx, &secs, argv[1]);
|
||||
@@ -186,7 +185,6 @@ static JSValue js_enet_host_service(JSContext *ctx, JSValueConst this_val, int a
|
||||
JS_FreeValue(ctx, event_obj);
|
||||
}
|
||||
|
||||
JS_FreeValue(ctx, callback);
|
||||
return JS_NULL;
|
||||
}
|
||||
|
||||
|
||||
@@ -226,7 +226,10 @@ static int par_easycurl_to_memory(char const *url, par_byte **data, int *nbytes)
|
||||
CFRelease(cfurlRef);
|
||||
if (!request) return 0;
|
||||
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
|
||||
CFReadStreamRef stream = CFReadStreamCreateForHTTPRequest(NULL, request);
|
||||
#pragma clang diagnostic pop
|
||||
CFRelease(request);
|
||||
if (!stream) return 0;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user