if (!OidIsValid(returning->typid))
    {
        ListCell   *lc;
-       bool        have_json = false;
        bool        have_jsonb = false;
 
        foreach(lc, args)
            Node       *expr = lfirst(lc);
            Oid         typid = exprType(expr);
 
-           have_json |= typid == JSONOID;
            have_jsonb |= typid == JSONBOID;
 
            if (have_jsonb)
        }
        else
        {
-           /* Note: this includes the have_json case */
-           
            /* XXX TEXT is default by the standard, but we return JSON */
            returning->typid = JSONOID;
            returning->format->format_type = JS_FORMAT_JSON;
 
            funcname = "JSON_ARRAY";
            break;
        case JSCTOR_JSON_OBJECTAGG:
-           return get_json_agg_constructor(ctor, context, "JSON_OBJECTAGG", true);
+           get_json_agg_constructor(ctor, context, "JSON_OBJECTAGG", true);
+           return;
        case JSCTOR_JSON_ARRAYAGG:
-           return get_json_agg_constructor(ctor, context, "JSON_ARRAYAGG", false);
+           get_json_agg_constructor(ctor, context, "JSON_ARRAYAGG", false);
+           return;
        default:
            elog(ERROR, "invalid JsonConstructorExprType %d", ctor->type);
    }
 static void
 get_agg_expr(Aggref *aggref, deparse_context *context, Aggref *original_aggref)
 {
-   return get_agg_expr_helper(aggref, context, original_aggref, NULL, NULL,
-                              false);
+   get_agg_expr_helper(aggref, context, original_aggref, NULL, NULL,
+                       false);
 }
 
 /*
 static void
 get_windowfunc_expr(WindowFunc *wfunc, deparse_context *context)
 {
-   return get_windowfunc_expr_helper(wfunc, context, NULL, NULL, false);
+   get_windowfunc_expr_helper(wfunc, context, NULL, NULL, false);
 }
 
 /*
    get_json_constructor_options(ctor, &options);
 
    if (IsA(ctor->func, Aggref))
-       return get_agg_expr_helper((Aggref *) ctor->func, context,
-                                  (Aggref *) ctor->func,
-                                  funcname, options.data, is_json_objectagg);
+       get_agg_expr_helper((Aggref *) ctor->func, context,
+                           (Aggref *) ctor->func,
+                           funcname, options.data, is_json_objectagg);
    else if (IsA(ctor->func, WindowFunc))
-       return get_windowfunc_expr_helper((WindowFunc *) ctor->func, context,
-                                         funcname, options.data,
-                                         is_json_objectagg);
+       get_windowfunc_expr_helper((WindowFunc *) ctor->func, context,
+                                  funcname, options.data,
+                                  is_json_objectagg);
    else
        elog(ERROR, "invalid JsonConstructorExpr underlying node type: %d",
             nodeTag(ctor->func));