]> git.kaiwu.me - quickjs.git/commitdiff
removed uninitialized values - removed useless init
authorFabrice Bellard <fabrice@bellard.org>
Sat, 20 Sep 2025 12:31:14 +0000 (14:31 +0200)
committerFabrice Bellard <fabrice@bellard.org>
Sat, 20 Sep 2025 12:31:14 +0000 (14:31 +0200)
quickjs.c

index baf2826e5b3598db2e35b3a42d32eabda25b982a..9a17c0810b932972165efd62eef27793bac87dbd 100644 (file)
--- a/quickjs.c
+++ b/quickjs.c
@@ -49387,14 +49387,12 @@ static JSValue js_set_isDisjointFrom(JSContext *ctx, JSValueConst this_val,
     int64_t size;
     int ok;
 
-    has = JS_UNDEFINED;
     iter = JS_UNDEFINED;
-    keys = JS_UNDEFINED;
     next = JS_UNDEFINED;
     rval = JS_EXCEPTION;
     s = JS_GetOpaque2(ctx, this_val, JS_CLASS_SET);
     if (!s)
-        goto exception;
+        return JS_EXCEPTION;
     if (get_set_record(ctx, argv[0], &size, &has, &keys) < 0)
         goto exception;
     if (s->record_count <= size) {
@@ -49456,14 +49454,12 @@ static JSValue js_set_isSubsetOf(JSContext *ctx, JSValueConst this_val,
     int64_t size;
     int done, ok;
 
-    has = JS_UNDEFINED;
     iter = JS_UNDEFINED;
-    keys = JS_UNDEFINED;
     next = JS_UNDEFINED;
     rval = JS_EXCEPTION;
     s = JS_GetOpaque2(ctx, this_val, JS_CLASS_SET);
     if (!s)
-        goto exception;
+        return JS_EXCEPTION;
     if (get_set_record(ctx, argv[0], &size, &has, &keys) < 0)
         goto exception;
     found = FALSE;
@@ -49505,14 +49501,12 @@ static JSValue js_set_isSupersetOf(JSContext *ctx, JSValueConst this_val,
     JSMapState *s;
     int64_t size;
 
-    has = JS_UNDEFINED;
     iter = JS_UNDEFINED;
-    keys = JS_UNDEFINED;
     next = JS_UNDEFINED;
     rval = JS_EXCEPTION;
     s = JS_GetOpaque2(ctx, this_val, JS_CLASS_SET);
     if (!s)
-        goto exception;
+        return JS_EXCEPTION;
     if (get_set_record(ctx, argv[0], &size, &has, &keys) < 0)
         goto exception;
     found = FALSE;
@@ -49558,14 +49552,12 @@ static JSValue js_set_intersection(JSContext *ctx, JSValueConst this_val,
     int64_t size;
     int done, ok;
 
-    has = JS_UNDEFINED;
     iter = JS_UNDEFINED;
-    keys = JS_UNDEFINED;
     next = JS_UNDEFINED;
     newset = JS_UNDEFINED;
     s = JS_GetOpaque2(ctx, this_val, JS_CLASS_SET);
     if (!s)
-        goto exception;
+        return JS_EXCEPTION;
     if (get_set_record(ctx, argv[0], &size, &has, &keys) < 0)
         goto exception;
     if (s->record_count > size) {
@@ -49651,14 +49643,12 @@ static JSValue js_set_difference(JSContext *ctx, JSValueConst this_val,
     int done;
     int ok;
 
-    has = JS_UNDEFINED;
     iter = JS_UNDEFINED;
-    keys = JS_UNDEFINED;
     next = JS_UNDEFINED;
     newset = JS_UNDEFINED;
     s = JS_GetOpaque2(ctx, this_val, JS_CLASS_SET);
     if (!s)
-        goto exception;
+        return JS_EXCEPTION;
     if (get_set_record(ctx, argv[0], &size, &has, &keys) < 0)
         goto exception;
 
@@ -49735,6 +49725,7 @@ static JSValue js_set_symmetricDifference(JSContext *ctx, JSValueConst this_val,
     JS_FreeValue(ctx, has);
 
     next = JS_UNDEFINED;
+    newset = JS_UNDEFINED;
     iter = JS_Call(ctx, keys, argv[0], 0, NULL);
     if (JS_IsException(iter))
         goto exception;
@@ -49801,6 +49792,7 @@ static JSValue js_set_union(JSContext *ctx, JSValueConst this_val,
     JS_FreeValue(ctx, has);
 
     next = JS_UNDEFINED;
+    newset = JS_UNDEFINED;
     iter = JS_Call(ctx, keys, argv[0], 0, NULL);
     if (JS_IsException(iter))
         goto exception;