diff --git a/racket/src/racket/cmdline.inc b/racket/src/racket/cmdline.inc index ef45e3c6a4..05ee23f3bb 100644 --- a/racket/src/racket/cmdline.inc +++ b/racket/src/racket/cmdline.inc @@ -142,8 +142,6 @@ static void configure_environment(Scheme_Object *mod) Scheme_Object *mli, *dyreq, *a[3], *gi, *v, *vs; Scheme_Object *submod, *cr, *mdp, *mpij; - cr = scheme_intern_symbol("configure-runtime"); - /* Modern style: look for `runtime-configure' submodule to initialize the configuration: */ @@ -1154,7 +1152,6 @@ static int run_from_cmd_line(int argc, char *_argv[], } else { /* No switches => -u mode */ script_mode = 1; - no_more_switches = 1; sprog = argv[0]; evals_and_loads[num_enl] = argv[0]; eval_kind[num_enl++] = mzcmd_REQUIRE_FILE; diff --git a/racket/src/racket/sgc/sgc.c b/racket/src/racket/sgc/sgc.c index 376a85f1c0..5cf6ab8b11 100644 --- a/racket/src/racket/sgc/sgc.c +++ b/racket/src/racket/sgc/sgc.c @@ -1010,7 +1010,7 @@ static AllocCacheBlock *alloc_cache; static void *platform_plain_sector(int count, int executable) { - intptr_t sd; + intptr_t sd = 0; if (executable) return mmap_sector(count, 1); diff --git a/racket/src/racket/src/bignum.c b/racket/src/racket/src/bignum.c index 88b9662923..cfab68ed14 100644 --- a/racket/src/racket/src/bignum.c +++ b/racket/src/racket/src/bignum.c @@ -926,7 +926,7 @@ static Scheme_Object *do_bitop(const Scheme_Object *a, const Scheme_Object *b, i intptr_t a_size, b_size, a_pos, b_pos, res_alloc, i; short res_pos; bigdig* a_digs, *b_digs, *res_digs, quick_digs[1]; - int carry_out_a, carry_out_b, carry_out_res, carry_in_a, carry_in_b, carry_in_res; + int carry_out_a, carry_out_b, carry_out_res, carry_in_b, carry_in_res; Scheme_Object* o; SAFE_SPACE(asd) SAFE_SPACE(bsd) @@ -972,7 +972,7 @@ static Scheme_Object *do_bitop(const Scheme_Object *a, const Scheme_Object *b, i res_digs = allocate_bigdig_array(res_alloc); carry_out_a = carry_out_b = carry_out_res = 1; - carry_in_a = carry_in_b = carry_in_res = 0; + carry_in_b = carry_in_res = 0; for (i = 0; i < res_alloc; ++i) { @@ -981,8 +981,8 @@ static Scheme_Object *do_bitop(const Scheme_Object *a, const Scheme_Object *b, i a_val = a_digs[i]; if (!a_pos) { - /* We have to do te operation on the 2's complement of a */ - carry_in_a = carry_out_a; + /* We have to do the operation on the 2's complement of a */ + int carry_in_a = carry_out_a; carry_out_a = (carry_in_a == 1 && a_val == 0) ? 1 : 0; a_val = ~a_val + carry_in_a; } diff --git a/racket/src/racket/src/fun.c b/racket/src/racket/src/fun.c index 99eea00330..6d07461c7a 100644 --- a/racket/src/racket/src/fun.c +++ b/racket/src/racket/src/fun.c @@ -3399,7 +3399,7 @@ static Scheme_Object *do_chaperone_procedure(const char *name, const char *whati int argc, Scheme_Object *argv[], int is_unsafe) { Scheme_Chaperone *px, *px2; - Scheme_Object *val = argv[0], *orig, *naya, *r, *app_mark; + Scheme_Object *val = argv[0], *orig, *r, *app_mark; Scheme_Object *props; if (SCHEME_CHAPERONEP(val)) @@ -3416,9 +3416,8 @@ static Scheme_Object *do_chaperone_procedure(const char *name, const char *whati } orig = get_or_check_arity(val, -1, NULL, 1); - if (SCHEME_FALSEP(argv[1])) - naya = scheme_false; - else { + if (!SCHEME_FALSEP(argv[1])) { + Scheme_Object *naya; naya = get_or_check_arity(argv[1], -1, NULL, 1); if (!is_subarity(orig, naya, pass_self ? 1 : 0)) @@ -8763,13 +8762,9 @@ static Scheme_Object *get_set_cont_mark_by_pos(Scheme_Object *key, bottom = 0; } else { startpos = (intptr_t)MZ_CONT_MARK_STACK; - if (!p->cont_mark_stack_segments) - findpos = 0; bottom = p->cont_mark_stack_bottom; } - findpos = startpos; - /* binary search: */ while (bottom < startpos) { findpos = ((bottom + startpos) / 2) - down_delta; diff --git a/racket/src/racket/src/future.c b/racket/src/racket/src/future.c index 98c5d9416d..301325ec65 100644 --- a/racket/src/racket/src/future.c +++ b/racket/src/racket/src/future.c @@ -2948,8 +2948,8 @@ void scheme_wrong_contract_from_ft(const char *who, const char *expected_type, i future->source_of_request = who; future_do_runtimecall(fts, NULL, 0, 1, 0); - /* Fetch the future again, in case moved by a GC */ - future = fts->thread->current_ft; + /* If more: fetch the future again, in case moved by a GC */ + /* future = fts->thread->current_ft; */ } Scheme_Object **scheme_rtcall_on_demand(Scheme_Object **argv) diff --git a/racket/src/racket/src/gen-jit-ts.rkt b/racket/src/racket/src/gen-jit-ts.rkt index fe1c646e9d..bd85516e5c 100644 --- a/racket/src/racket/src/gen-jit-ts.rkt +++ b/racket/src/racket/src/gen-jit-ts.rkt @@ -100,7 +100,7 @@ @(if (equal? arg-types '("Scheme_Object*")) @string-append{send_special_result(future, @(car arg-names));} "") future_do_runtimecall(fts, (void*)f, 0, 1, 0); fts->thread = scheme_current_thread; - future = fts->thread->current_ft; + @(if (string=? result-type "void") "" @string-append{future = fts->thread->current_ft;}) @(if (string=? result-type "void") "" @string-append{retval = @|fretval|;}) @(if (string=? result-type "void") "" @string-append{@|fretval| = 0;}) @(if (string=? result-type "Scheme_Object*") @string-append{receive_special_result(future, retval, 1);} "") diff --git a/racket/src/racket/src/jit_ts_future_glue.c b/racket/src/racket/src/jit_ts_future_glue.c index f95e4778d1..e79f304e01 100644 --- a/racket/src/racket/src/jit_ts_future_glue.c +++ b/racket/src/racket/src/jit_ts_future_glue.c @@ -304,7 +304,7 @@ future_do_runtimecall(fts, (void*)f, 0, 1, 0); fts->thread = scheme_current_thread; - future = fts->thread->current_ft; + @@ -331,7 +331,7 @@ future_do_runtimecall(fts, (void*)f, 0, 1, 0); fts->thread = scheme_current_thread; - future = fts->thread->current_ft; + @@ -357,7 +357,7 @@ future_do_runtimecall(fts, (void*)f, 0, 1, 0); fts->thread = scheme_current_thread; - future = fts->thread->current_ft; + @@ -382,7 +382,7 @@ future_do_runtimecall(fts, (void*)f, 0, 1, 0); fts->thread = scheme_current_thread; - future = fts->thread->current_ft; + @@ -484,7 +484,7 @@ send_special_result(future, g272); future_do_runtimecall(fts, (void*)f, 0, 1, 0); fts->thread = scheme_current_thread; - future = fts->thread->current_ft; + @@ -538,7 +538,7 @@ future_do_runtimecall(fts, (void*)f, 0, 1, 0); fts->thread = scheme_current_thread; - future = fts->thread->current_ft; + @@ -643,7 +643,7 @@ future_do_runtimecall(fts, (void*)f, 0, 1, 0); fts->thread = scheme_current_thread; - future = fts->thread->current_ft; + @@ -696,7 +696,7 @@ future_do_runtimecall(fts, (void*)f, 0, 1, 0); fts->thread = scheme_current_thread; - future = fts->thread->current_ft; + @@ -748,7 +748,7 @@ future_do_runtimecall(fts, (void*)f, 0, 1, 0); fts->thread = scheme_current_thread; - future = fts->thread->current_ft; + @@ -774,7 +774,7 @@ future_do_runtimecall(fts, (void*)f, 0, 1, 0); fts->thread = scheme_current_thread; - future = fts->thread->current_ft; + diff --git a/racket/src/rktio/rktio_network.c b/racket/src/rktio/rktio_network.c index 68b83fae05..cc1378d896 100644 --- a/racket/src/rktio/rktio_network.c +++ b/racket/src/rktio/rktio_network.c @@ -516,8 +516,10 @@ static rktio_addrinfo_lookup_t *start_lookup(rktio_t *rktio, rktio_addrinfo_look if (!rktio->ghbn_started) { rktio->ghbn_run = 1; - if (!ghbn_init(rktio)) + if (!ghbn_init(rktio)) { + free_lookup(lookup); return NULL; + } rktio->ghbn_started = 1; }