fix variables assigned but not referenced
This commit is contained in:
parent
73615de58f
commit
78c2d7b9ab
|
@ -150,7 +150,9 @@ static block_desc *bc_alloc_std_block(block_group *bg) {
|
|||
static void *bc_alloc_std_page(BlockCache *bc, int dirty_ok, int expect_mprotect, void **src_block, ssize_t *size_diff) {
|
||||
block_group *bg = (expect_mprotect ? &bc->non_atomic : &bc->atomic);
|
||||
GCList *free_head = &bg->free;
|
||||
#if BC_ASSERTS
|
||||
int newbl = 0;
|
||||
#endif
|
||||
|
||||
tryagain:
|
||||
if (!gclist_is_empty(free_head)) {
|
||||
|
@ -161,7 +163,9 @@ static void *bc_alloc_std_page(BlockCache *bc, int dirty_ok, int expect_mprotect
|
|||
}
|
||||
else {
|
||||
block_desc *bd;
|
||||
#if BC_ASSERTS
|
||||
newbl = 1;
|
||||
#endif
|
||||
bd = bc_alloc_std_block(bg);
|
||||
if (!bd) return NULL;
|
||||
gclist_add(free_head, &(bd->gclist));
|
||||
|
|
|
@ -1306,7 +1306,7 @@ char *scheme_bignum_to_string(const Scheme_Object *b, int radix)
|
|||
|
||||
Scheme_Object *scheme_read_bignum(const mzchar *str, int offset, int radix)
|
||||
{
|
||||
intptr_t len, negate, stri, alloc, i, test;
|
||||
intptr_t len, negate, stri, alloc, i;
|
||||
Scheme_Object* o;
|
||||
bigdig* digs;
|
||||
unsigned char* istring;
|
||||
|
@ -1368,7 +1368,7 @@ Scheme_Object *scheme_read_bignum(const mzchar *str, int offset, int radix)
|
|||
|
||||
SCHEME_SET_BIGPOS(o, !negate);
|
||||
|
||||
test = mpn_set_str(digs, istring, len, radix);
|
||||
(void)mpn_set_str(digs, istring, len, radix);
|
||||
|
||||
FREE_PROTECT(istring);
|
||||
FINISH_RESULT(digs, alloc);
|
||||
|
|
|
@ -38,9 +38,6 @@ Scheme_Object *scheme_eval_compiled_sized_string_with_magic(const char *str, int
|
|||
int multi_ok)
|
||||
{
|
||||
Scheme_Object *port, *expr;
|
||||
Scheme_Config *config;
|
||||
|
||||
config = scheme_current_config();
|
||||
|
||||
port = scheme_make_sized_byte_string_input_port(str, -len); /* negative means it's constant */
|
||||
|
||||
|
|
|
@ -999,7 +999,7 @@ Scheme_Object *scheme_tl_id_sym(Scheme_Env *env, Scheme_Object *id, Scheme_Objec
|
|||
/* The `env' argument can actually be a hash table. */
|
||||
{
|
||||
Scheme_Object *marks = NULL, *sym, *map, *l, *a, *amarks, *m, *best_match, *cm, *abdg;
|
||||
int best_match_skipped, ms, one_mark;
|
||||
int best_match_skipped, ms;
|
||||
Scheme_Hash_Table *marked_names, *temp_marked_names, *dest_marked_names;
|
||||
|
||||
sym = SCHEME_STX_SYM(id);
|
||||
|
@ -1078,9 +1078,7 @@ Scheme_Object *scheme_tl_id_sym(Scheme_Env *env, Scheme_Object *id, Scheme_Objec
|
|||
Since the list is otherwise marshaled into .zo, etc.,
|
||||
simplify by extracting just the mark: */
|
||||
marks = SCHEME_CAR(marks);
|
||||
one_mark = 1;
|
||||
} else
|
||||
one_mark = 0;
|
||||
}
|
||||
|
||||
if (!SCHEME_TRUEP(bdg))
|
||||
bdg = NULL;
|
||||
|
@ -2134,7 +2132,6 @@ int *scheme_env_get_flags(Scheme_Comp_Env *frame, int start, int count)
|
|||
Scheme_Object *
|
||||
scheme_do_local_lift_expr(const char *who, int stx_pos, int argc, Scheme_Object *argv[])
|
||||
{
|
||||
Scheme_Env *menv;
|
||||
Scheme_Comp_Env *env, *orig_env;
|
||||
Scheme_Object *id, *ids, *rev_ids, *local_mark, *expr, *data, *vec, *id_sym;
|
||||
Scheme_Lift_Capture_Proc cp;
|
||||
|
@ -2203,8 +2200,6 @@ scheme_do_local_lift_expr(const char *who, int stx_pos, int argc, Scheme_Object
|
|||
cp = *(Scheme_Lift_Capture_Proc *)SCHEME_VEC_ELS(vec)[1];
|
||||
data = SCHEME_VEC_ELS(vec)[2];
|
||||
|
||||
menv = scheme_current_thread->current_local_menv;
|
||||
|
||||
orig_expr = expr;
|
||||
|
||||
expr = cp(data, &ids, expr, orig_env);
|
||||
|
|
|
@ -3683,7 +3683,6 @@ void scheme_init_exn(Scheme_Env *env)
|
|||
for (i = 0; i < MZEXN_OTHER; i++) {
|
||||
if (exn_table[i].count) {
|
||||
Scheme_Object **values;
|
||||
int sp;
|
||||
|
||||
values = scheme_make_struct_values(exn_table[i].type,
|
||||
exn_table[i].names,
|
||||
|
@ -3694,8 +3693,6 @@ void scheme_init_exn(Scheme_Env *env)
|
|||
values[j],
|
||||
env);
|
||||
}
|
||||
|
||||
sp = exn_table[i].super_pos;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -2190,7 +2190,6 @@ do_define_syntaxes_execute(Scheme_Object *form, Scheme_Env *dm_env)
|
|||
Scheme_Dynamic_State dyn_state;
|
||||
Scheme_Cont_Frame_Data cframe;
|
||||
Scheme_Config *config;
|
||||
Scheme_Object *result;
|
||||
|
||||
scheme_prepare_exp_env(dm_env);
|
||||
|
||||
|
@ -2203,7 +2202,7 @@ do_define_syntaxes_execute(Scheme_Object *form, Scheme_Env *dm_env)
|
|||
scheme_set_dynamic_state(&dyn_state, rhs_env, NULL, scheme_false, dm_env, dm_env->link_midx);
|
||||
|
||||
if (SAME_TYPE(SCHEME_TYPE(form), scheme_define_syntaxes_type)) {
|
||||
result = define_execute_with_dynamic_state(form, 4, 1, rp, dm_env, &dyn_state);
|
||||
(void)define_execute_with_dynamic_state(form, 4, 1, rp, dm_env, &dyn_state);
|
||||
} else {
|
||||
Scheme_Object **save_runstack;
|
||||
|
||||
|
@ -4022,6 +4021,7 @@ static void *eval_k(void)
|
|||
{
|
||||
Scheme_Thread *p = scheme_current_thread;
|
||||
Scheme_Object *v, **save_runstack;
|
||||
Resolve_Prefix *rp;
|
||||
Scheme_Env *env;
|
||||
int isexpr, multi, use_jit, as_tail;
|
||||
|
||||
|
@ -4046,7 +4046,6 @@ static void *eval_k(void)
|
|||
v = _scheme_eval_linked_expr_wp(v, p);
|
||||
} else if (SAME_TYPE(SCHEME_TYPE(v), scheme_compilation_top_type)) {
|
||||
Scheme_Compilation_Top *top = (Scheme_Compilation_Top *)v;
|
||||
Resolve_Prefix *rp;
|
||||
int depth;
|
||||
|
||||
if (!top->prefix)
|
||||
|
@ -4075,7 +4074,7 @@ static void *eval_k(void)
|
|||
v = scheme_eval_clone(v);
|
||||
rp = scheme_prefix_eval_clone(top->prefix);
|
||||
|
||||
save_runstack = scheme_push_prefix(env, top->prefix, NULL, NULL, 0, env->phase, NULL, scheme_false);
|
||||
save_runstack = scheme_push_prefix(env, rp, NULL, NULL, 0, env->phase, NULL, scheme_false);
|
||||
|
||||
if (as_tail) {
|
||||
/* Cons up a closure to capture the prefix */
|
||||
|
@ -4635,7 +4634,6 @@ do_local_expand(const char *name, int for_stx, int catch_lifts, int for_expr, in
|
|||
Scheme_Comp_Env *env, *orig_env, **ip;
|
||||
Scheme_Object *l, *local_mark, *renaming = NULL, *orig_l, *exp_expr = NULL;
|
||||
int cnt, pos, kind;
|
||||
int nonempty_stop_list = 0;
|
||||
int bad_sub_env = 0, bad_intdef = 0;
|
||||
Scheme_Object *observer, *catch_lifts_key = NULL;
|
||||
|
||||
|
@ -4752,7 +4750,6 @@ do_local_expand(const char *name, int for_stx, int catch_lifts, int for_expr, in
|
|||
if (cnt > 0) {
|
||||
cnt += NUM_CORE_EXPR_STOP_FORMS;
|
||||
scheme_add_local_syntax(cnt, env);
|
||||
nonempty_stop_list = 1;
|
||||
}
|
||||
pos = 0;
|
||||
|
||||
|
|
|
@ -2531,7 +2531,9 @@ static Scheme_Object *do_path_to_directory_path(char *s, intptr_t offset, intptr
|
|||
`offset' is always 0. */
|
||||
{
|
||||
char *s2;
|
||||
#if DROP_REDUNDANT_SLASHES
|
||||
int not_a_sep = 0;
|
||||
#endif
|
||||
|
||||
if (kind == SCHEME_WINDOWS_PATH_KIND) {
|
||||
int slash_dir_sep = 1;
|
||||
|
@ -2563,7 +2565,9 @@ static Scheme_Object *do_path_to_directory_path(char *s, intptr_t offset, intptr
|
|||
slash_dir_sep = 0;
|
||||
/* Any "." or ".." at the end is a literal path element,
|
||||
not an up- or same-directory indicator: */
|
||||
#if DROP_REDUNDANT_SLASHES
|
||||
not_a_sep = 1;
|
||||
#endif
|
||||
} else {
|
||||
#if DROP_REDUNDANT_SLASHES
|
||||
/* A slash after C: is not strictly necessary: */
|
||||
|
@ -3848,7 +3852,10 @@ failed:
|
|||
|
||||
static Scheme_Object *copy_file(int argc, Scheme_Object **argv)
|
||||
{
|
||||
char *src, *dest, *reason = NULL;
|
||||
char *reason = NULL;
|
||||
#ifdef DOS_FILE_SYSTEM
|
||||
char *src, *dest;
|
||||
#endif
|
||||
int pre_exists = 0, has_err_val = 0, err_val = 0, exists_ok = 0;
|
||||
Scheme_Object *bss, *bsd;
|
||||
|
||||
|
@ -3861,14 +3868,21 @@ static Scheme_Object *copy_file(int argc, Scheme_Object **argv)
|
|||
bsd = argv[1];
|
||||
exists_ok = ((argc > 2) && SCHEME_TRUEP(argv[2]));
|
||||
|
||||
src = scheme_expand_string_filename(bss,
|
||||
"copy-file",
|
||||
NULL,
|
||||
SCHEME_GUARD_FILE_READ);
|
||||
dest = scheme_expand_string_filename(bsd,
|
||||
"copy-file",
|
||||
NULL,
|
||||
SCHEME_GUARD_FILE_WRITE | SCHEME_GUARD_FILE_DELETE);
|
||||
#ifdef DOS_FILE_SYSTEM
|
||||
src =
|
||||
#endif
|
||||
scheme_expand_string_filename(bss,
|
||||
"copy-file",
|
||||
NULL,
|
||||
SCHEME_GUARD_FILE_READ);
|
||||
|
||||
#ifdef DOS_FILE_SYSTEM
|
||||
dest =
|
||||
#endif
|
||||
scheme_expand_string_filename(bsd,
|
||||
"copy-file",
|
||||
NULL,
|
||||
SCHEME_GUARD_FILE_WRITE | SCHEME_GUARD_FILE_DELETE);
|
||||
|
||||
#ifdef UNIX_FILE_SYSTEM
|
||||
{
|
||||
|
|
|
@ -7580,7 +7580,6 @@ Scheme_Object *scheme_apply_lightweight_continuation(Scheme_Lightweight_Continua
|
|||
int scheme_push_marks_from_lightweight_continuation(Scheme_Lightweight_Continuation *lw,
|
||||
Scheme_Cont_Frame_Data *d)
|
||||
{
|
||||
Scheme_Thread *p;
|
||||
intptr_t pos, len, delta;
|
||||
Scheme_Cont_Mark *seg;
|
||||
|
||||
|
@ -7590,7 +7589,6 @@ int scheme_push_marks_from_lightweight_continuation(Scheme_Lightweight_Continuat
|
|||
if (len) {
|
||||
scheme_push_continuation_frame(d);
|
||||
|
||||
p = scheme_current_thread;
|
||||
seg = lw->cont_mark_stack_slice;
|
||||
|
||||
delta = MZ_CONT_MARK_POS + 2 - lw->saved_lwc->cont_mark_pos_start;
|
||||
|
@ -7610,15 +7608,12 @@ int scheme_push_marks_from_lightweight_continuation(Scheme_Lightweight_Continuat
|
|||
|
||||
int scheme_push_marks_from_thread(Scheme_Thread *p2, Scheme_Cont_Frame_Data *d)
|
||||
{
|
||||
Scheme_Thread *p;
|
||||
intptr_t i, pos, delta;
|
||||
Scheme_Cont_Mark *seg;
|
||||
|
||||
if (p2->cont_mark_stack) {
|
||||
scheme_push_continuation_frame(d);
|
||||
|
||||
p = scheme_current_thread;
|
||||
|
||||
delta = MZ_CONT_MARK_POS - p2->cont_mark_pos;
|
||||
if (delta < 0) delta = 0;
|
||||
|
||||
|
|
|
@ -655,10 +655,9 @@ static void init_future_thread(Scheme_Future_State *fs, int i)
|
|||
fts->thread = skeleton;
|
||||
|
||||
{
|
||||
Scheme_Object **rs_start, **rs;
|
||||
Scheme_Object **rs_start;
|
||||
intptr_t init_runstack_size = FUTURE_RUNSTACK_SIZE;
|
||||
rs_start = scheme_alloc_runstack(init_runstack_size);
|
||||
rs = rs_start XFORM_OK_PLUS init_runstack_size;
|
||||
runstack_start = rs_start;
|
||||
fts->runstack_size = init_runstack_size;
|
||||
}
|
||||
|
@ -1277,7 +1276,7 @@ Scheme_Object *scheme_make_fsemaphore_inl(Scheme_Object *ready)
|
|||
sema->so.type = scheme_fsemaphore_type;
|
||||
|
||||
mzrt_mutex_create(&sema->mut);
|
||||
sema->ready = SCHEME_INT_VAL(ready);
|
||||
sema->ready = v;
|
||||
|
||||
scheme_register_finalizer((void*)sema, fsemaphore_finalize, NULL, NULL, NULL);
|
||||
|
||||
|
@ -1790,12 +1789,8 @@ Scheme_Object *general_touch(int argc, Scheme_Object *argv[])
|
|||
}
|
||||
else if (ft->status == FINISHED)
|
||||
{
|
||||
int id;
|
||||
|
||||
retval = ft->retval;
|
||||
|
||||
id = ft->id;
|
||||
|
||||
mzrt_mutex_unlock(fs->future_mutex);
|
||||
|
||||
break;
|
||||
|
|
|
@ -1088,12 +1088,10 @@ static Scheme_Object *read_resolve_prefix(Scheme_Object *obj)
|
|||
Resolve_Prefix *rp;
|
||||
Scheme_Object *tv, *sv, **a, *stx;
|
||||
intptr_t i;
|
||||
int uses_unsafe = 0;
|
||||
|
||||
if (!SCHEME_PAIRP(obj)) return NULL;
|
||||
|
||||
if (!SCHEME_INTP(SCHEME_CAR(obj))) {
|
||||
uses_unsafe = 1;
|
||||
obj = SCHEME_CDR(obj);
|
||||
}
|
||||
|
||||
|
|
|
@ -1374,7 +1374,7 @@ static Scheme_Object *do_namespace_attach_module(const char *who, int argc, Sche
|
|||
Scheme_Hash_Table *checked, *next_checked, *prev_checked;
|
||||
Scheme_Object *past_checkeds, *future_checkeds, *future_todos, *past_to_modchains, *past_todos;
|
||||
Scheme_Module *m2;
|
||||
int same_namespace, set_env_for_notify = 0, phase, orig_phase, max_phase, first_iteration;
|
||||
int same_namespace, set_env_for_notify = 0, phase, orig_phase, max_phase;
|
||||
int just_declare;
|
||||
Scheme_Object *nophase_todo;
|
||||
Scheme_Hash_Table *nophase_checked;
|
||||
|
@ -1433,7 +1433,6 @@ static Scheme_Object *do_namespace_attach_module(const char *who, int argc, Sche
|
|||
scheme_hash_set(nophase_checked, name, scheme_false);
|
||||
}
|
||||
|
||||
first_iteration = 1;
|
||||
max_phase = phase;
|
||||
|
||||
checked = scheme_make_hash_table(SCHEME_hash_ptr);
|
||||
|
@ -3674,9 +3673,6 @@ static void check_certified(Scheme_Object *stx,
|
|||
int var, int prot, int *_would_complain)
|
||||
{
|
||||
int need_cert = 1;
|
||||
Scheme_Object *midx;
|
||||
|
||||
midx = (env->link_midx ? env->link_midx : env->module->me->src_modidx);
|
||||
|
||||
if (need_cert && insp)
|
||||
need_cert = scheme_module_protected_wrt(env->insp, insp);
|
||||
|
@ -4662,7 +4658,7 @@ static void start_module(Scheme_Module *m, Scheme_Env *env, int restart,
|
|||
- If `eval_exp' is 1, then visit at phase P => run phase P+1. */
|
||||
{
|
||||
Scheme_Env *menv;
|
||||
Scheme_Object *l, *new_cycle_list;
|
||||
Scheme_Object *l;
|
||||
int prep_namespace = 0, i;
|
||||
|
||||
if (is_builtin_modname(m->modname))
|
||||
|
@ -4676,8 +4672,6 @@ static void start_module(Scheme_Module *m, Scheme_Env *env, int restart,
|
|||
}
|
||||
}
|
||||
|
||||
new_cycle_list = scheme_make_pair(m->modname, cycle_list);
|
||||
|
||||
menv = instantiate_module(m, env, restart, syntax_idx, not_new);
|
||||
|
||||
check_phase(menv, env, 0);
|
||||
|
@ -5675,7 +5669,7 @@ Scheme_Object *scheme_module_eval_clone(Scheme_Object *data)
|
|||
static Scheme_Object *do_module(Scheme_Object *form, Scheme_Comp_Env *env,
|
||||
Scheme_Compile_Expand_Info *rec, int drec)
|
||||
{
|
||||
Scheme_Object *fm, *nm, *ii, *rn, *et_rn, *iidx, *self_modidx, *rmp, *rn_set;
|
||||
Scheme_Object *fm, *nm, *ii, *iidx, *self_modidx, *rmp, *rn_set;
|
||||
Scheme_Module *iim;
|
||||
Scheme_Env *menv, *top_env;
|
||||
Scheme_Comp_Env *benv;
|
||||
|
@ -5789,8 +5783,6 @@ static Scheme_Object *do_module(Scheme_Object *form, Scheme_Comp_Env *env,
|
|||
scheme_prepare_env_renames(menv, mzMOD_RENAME_NORMAL);
|
||||
|
||||
rn_set = menv->rename_set;
|
||||
rn = scheme_get_module_rename_from_set(rn_set, scheme_make_integer(0), 1);
|
||||
et_rn = scheme_get_module_rename_from_set(rn_set, scheme_make_integer(1), 1);
|
||||
|
||||
{
|
||||
Scheme_Object *insp;
|
||||
|
@ -6883,9 +6875,6 @@ static Scheme_Object *do_module_begin_at_phase(Scheme_Object *form, Scheme_Comp_
|
|||
fst = SCHEME_STX_CAR(e);
|
||||
|
||||
if (SCHEME_STX_SYMBOLP(fst)) {
|
||||
|
||||
Scheme_Object *n;
|
||||
n = SCHEME_STX_CAR(e);
|
||||
if (scheme_stx_module_eq(define_values_stx, fst, phase)) {
|
||||
/************ define-values *************/
|
||||
Scheme_Object *vars, *val;
|
||||
|
@ -7894,13 +7883,11 @@ int compute_reprovides(Scheme_Hash_Table *all_provided,
|
|||
|
||||
for (i = required->size; i--; ) {
|
||||
if (required->vals[i]) {
|
||||
Scheme_Object *nominal_modidx, *name, *modidx, *srcname, *outname, *nml, *orig_nml, *mark_src;
|
||||
Scheme_Object *nominal_modidx, *name, *outname, *nml, *orig_nml, *mark_src;
|
||||
int break_outer = 0;
|
||||
|
||||
name = required->keys[i]; /* internal symbolic name */
|
||||
orig_nml = SCHEME_VEC_ELS(required->vals[i])[0];
|
||||
modidx = SCHEME_VEC_ELS(required->vals[i])[1];
|
||||
srcname = SCHEME_VEC_ELS(required->vals[i])[2];
|
||||
outname = SCHEME_VEC_ELS(required->vals[i])[4];
|
||||
mark_src = SCHEME_VEC_ELS(required->vals[i])[6];
|
||||
|
||||
|
@ -9156,7 +9143,7 @@ void parse_provides(Scheme_Object *form, Scheme_Object *fst, Scheme_Object *e,
|
|||
Scheme_Object *f;
|
||||
f = SCHEME_STX_CAR(mode_stx);
|
||||
a = scheme_make_pair(for_meta_symbol,
|
||||
scheme_make_pair(mode,
|
||||
scheme_make_pair(f,
|
||||
scheme_make_pair(a, scheme_null)));
|
||||
a = scheme_datum_to_syntax(a, mode_stx, mode_stx, 0, 0);
|
||||
}
|
||||
|
|
|
@ -3494,7 +3494,7 @@ scheme_optimize_lets(Scheme_Object *form, Optimize_Info *info, int for_inline, i
|
|||
Scheme_Object *body, *value, *ready_pairs = NULL, *rp_last = NULL, *ready_pairs_start;
|
||||
Scheme_Once_Used *first_once_used = NULL, *last_once_used = NULL, *once_used;
|
||||
int i, j, pos, is_rec, not_simply_let_star = 0, undiscourage, split_shift, skip_opts = 0;
|
||||
int size_before_opt, did_set_value, checked_once;
|
||||
int did_set_value, checked_once;
|
||||
int remove_last_one = 0, inline_fuel, rev_bind_order;
|
||||
int post_bind = !(SCHEME_LET_FLAGS(head) & (SCHEME_LET_RECURSIVE | SCHEME_LET_STAR));
|
||||
|
||||
|
@ -3751,8 +3751,6 @@ scheme_optimize_lets(Scheme_Object *form, Optimize_Info *info, int for_inline, i
|
|||
pre_body = (Scheme_Compiled_Let_Value *)body;
|
||||
pos = pre_body->position;
|
||||
|
||||
size_before_opt = body_info->size;
|
||||
|
||||
if ((pre_body->count == 1)
|
||||
&& IS_COMPILED_PROC(pre_body->value)
|
||||
&& !optimize_is_used(body_info, pos)) {
|
||||
|
|
|
@ -4429,13 +4429,13 @@ scheme_do_open_input_file(char *name, int offset, int argc, Scheme_Object *argv[
|
|||
int fd;
|
||||
struct stat buf;
|
||||
#else
|
||||
char *mode = "rb";
|
||||
# ifdef WINDOWS_FILE_HANDLES
|
||||
HANDLE fd;
|
||||
# else
|
||||
FILE *fp;
|
||||
# endif
|
||||
#endif
|
||||
char *mode = "rb";
|
||||
char *filename;
|
||||
int regfile, i;
|
||||
int m_set = 0;
|
||||
|
@ -4449,7 +4449,9 @@ scheme_do_open_input_file(char *name, int offset, int argc, Scheme_Object *argv[
|
|||
scheme_wrong_type(name, "symbol", i, argc, argv);
|
||||
|
||||
if (SAME_OBJ(argv[i], text_symbol)) {
|
||||
#ifndef USE_FD_PORTS
|
||||
mode = "rt";
|
||||
#endif
|
||||
m_set++;
|
||||
} else if (SAME_OBJ(argv[i], binary_symbol)) {
|
||||
/* This is the default */
|
||||
|
@ -9383,8 +9385,8 @@ static void close_fds_after_fork(int skip1, int skip2, int skip3)
|
|||
static Scheme_Object *sch_shell_execute(int c, Scheme_Object *argv[])
|
||||
{
|
||||
int show;
|
||||
char *dir;
|
||||
#ifdef WINDOWS_PROCESSES
|
||||
char *dir;
|
||||
# define mzseSHOW(x) x
|
||||
#else
|
||||
# define mzseSHOW(x) 1
|
||||
|
@ -9422,9 +9424,12 @@ static Scheme_Object *sch_shell_execute(int c, Scheme_Object *argv[])
|
|||
scheme_wrong_type("shell-execute", "show-mode symbol", 4, c, argv);
|
||||
}
|
||||
|
||||
dir = scheme_expand_string_filename(argv[3],
|
||||
"shell-execute", NULL,
|
||||
SCHEME_GUARD_FILE_EXISTS);
|
||||
#ifdef WINDOWS_PROCESSES
|
||||
dir =
|
||||
#endif
|
||||
scheme_expand_string_filename(argv[3],
|
||||
"shell-execute", NULL,
|
||||
SCHEME_GUARD_FILE_EXISTS);
|
||||
#ifdef WINDOWS_PROCESSES
|
||||
{
|
||||
SHELLEXECUTEINFOW se;
|
||||
|
@ -10017,7 +10022,6 @@ static void start_green_thread_timer(intptr_t usec)
|
|||
|
||||
static void kill_green_thread_timer()
|
||||
{
|
||||
void *rc;
|
||||
pthread_mutex_lock(&itimerdata->mutex);
|
||||
itimerdata->die = 1;
|
||||
if (!itimerdata->state) {
|
||||
|
@ -10030,7 +10034,7 @@ static void kill_green_thread_timer()
|
|||
asked it to continue */
|
||||
}
|
||||
pthread_mutex_unlock(&itimerdata->mutex);
|
||||
rc = mz_proc_thread_wait(itimerdata->thread);
|
||||
(void)mz_proc_thread_wait(itimerdata->thread);
|
||||
free(itimerdata);
|
||||
itimerdata = NULL;
|
||||
}
|
||||
|
|
|
@ -1771,7 +1771,7 @@ regranges(int parse_flags, int at_start)
|
|||
{
|
||||
int c;
|
||||
rxpos ret, save_regparse = 0;
|
||||
int count, all_ci, num_ci, off_ranges, on_ranges, now_on, last_on, prev_last_on, use_ci;
|
||||
int count, all_ci, num_ci, off_ranges, on_ranges, now_on, last_on, prev_last_on;
|
||||
char *new_map = NULL, *accum_map = NULL;
|
||||
|
||||
count = 0;
|
||||
|
@ -1869,7 +1869,6 @@ regranges(int parse_flags, int at_start)
|
|||
if (!accum_map)
|
||||
FAIL("should have found one range!");
|
||||
|
||||
use_ci = 0;
|
||||
while (1) {
|
||||
/* Collect stats to pick the best run-time implementation for a range.
|
||||
We may do this twice if we decide to use a _CI variant. */
|
||||
|
@ -2658,7 +2657,6 @@ regexec(const char *who,
|
|||
if (!peek) {
|
||||
/* Need to consume matched chars: */
|
||||
char *drain;
|
||||
intptr_t got;
|
||||
|
||||
if (discard_oport && *startp)
|
||||
scheme_put_byte_string(who, discard_oport, *stringp, 0, *startp, 0);
|
||||
|
@ -2668,7 +2666,7 @@ regexec(const char *who,
|
|||
else
|
||||
/* Allocate fresh in case we get different results from previous peek: */
|
||||
drain = (char *)scheme_malloc_atomic(*endp);
|
||||
got = scheme_get_byte_string(who, port, drain, 0, *endp, 0, 0, 0);
|
||||
(void)scheme_get_byte_string(who, port, drain, 0, *endp, 0, 0, 0);
|
||||
}
|
||||
|
||||
*_dropped = dropped;
|
||||
|
|
|
@ -1016,7 +1016,6 @@ scheme_resolve_lets(Scheme_Object *form, Resolve_Info *info)
|
|||
num_rec_procs = 0;
|
||||
} else {
|
||||
/* Sequence of single-value, non-assigned lets? */
|
||||
int some_used = 0;
|
||||
|
||||
clv = (Scheme_Compiled_Let_Value *)head->body;
|
||||
for (i = head->num_clauses; i--; clv = (Scheme_Compiled_Let_Value *)clv->body) {
|
||||
|
@ -1024,8 +1023,6 @@ scheme_resolve_lets(Scheme_Object *form, Resolve_Info *info)
|
|||
break;
|
||||
if (clv->flags[0] & SCHEME_WAS_SET_BANGED)
|
||||
break;
|
||||
if (clv->flags[0] & SCHEME_WAS_USED)
|
||||
some_used = 1;
|
||||
}
|
||||
|
||||
if (i < 0) {
|
||||
|
@ -1297,10 +1294,9 @@ scheme_resolve_lets(Scheme_Object *form, Resolve_Info *info)
|
|||
resolve_info_add_mapping(linfo, opos, 0, 0, NULL);
|
||||
} else {
|
||||
for (j = 0; j < clv->count; j++) {
|
||||
int p, skip;
|
||||
int p;
|
||||
Scheme_Object *lift;
|
||||
|
||||
skip = 0;
|
||||
if (num_rec_procs
|
||||
&& (clv->count == 1)
|
||||
&& is_nonconstant_procedure(clv->value, info, head->count)) {
|
||||
|
@ -3135,7 +3131,8 @@ static int unresolve_set_flag(Unresolve_Info *ui, int pos, int flag)
|
|||
{
|
||||
int old_flag, i = ui->stack_pos - pos - 1;
|
||||
|
||||
if (pos >= ui->stack_pos) scheme_signal_error("internal error: unresolve too far");
|
||||
if ((pos < 0) || (pos >= ui->stack_pos))
|
||||
scheme_signal_error("internal error: unresolve out of bounds");
|
||||
|
||||
old_flag = ui->flags[i];
|
||||
flag = combine_flags(flag | (1 << SCHEME_USE_COUNT_SHIFT), old_flag);
|
||||
|
|
|
@ -1092,7 +1092,7 @@ static Scheme_Object *make_struct_type_property_from_c(int argc, Scheme_Object *
|
|||
Scheme_Struct_Property *p;
|
||||
Scheme_Object *a[1], *v, *supers = scheme_null;
|
||||
char *name;
|
||||
int len, can_impersonate = 0;
|
||||
int len;
|
||||
const char *who;
|
||||
|
||||
if (type == scheme_struct_property_type)
|
||||
|
@ -1105,10 +1105,9 @@ static Scheme_Object *make_struct_type_property_from_c(int argc, Scheme_Object *
|
|||
if (argc > 1) {
|
||||
if (SCHEME_SYMBOLP(argv[1])
|
||||
&& !SCHEME_SYM_WEIRDP(argv[1])
|
||||
&& !strcmp("can-impersonate", SCHEME_SYM_VAL(argv[1])))
|
||||
can_impersonate = 1;
|
||||
else if (SCHEME_TRUEP(argv[1])
|
||||
&& !scheme_check_proc_arity(NULL, 2, 1, argc, argv))
|
||||
&& !strcmp("can-impersonate", SCHEME_SYM_VAL(argv[1]))) {
|
||||
} else if (SCHEME_TRUEP(argv[1])
|
||||
&& !scheme_check_proc_arity(NULL, 2, 1, argc, argv))
|
||||
scheme_wrong_type(who, "procedure (arity 2), #f, or 'can-impersonate", 1, argc, argv);
|
||||
|
||||
if (argc > 2) {
|
||||
|
|
|
@ -192,8 +192,7 @@ static Scheme_Object *rehash_symbol_bucket(Scheme_Hash_Table *table,
|
|||
{
|
||||
Scheme_Object **ba;
|
||||
#ifdef MZ_PRECISE_GC
|
||||
ba = (Scheme_Object **)GC_malloc_weak_array(sizeof(Scheme_Object *) * newsize,
|
||||
SYMTAB_LOST_CELL);
|
||||
ba = (Scheme_Object **)GC_malloc_weak_array(asize, SYMTAB_LOST_CELL);
|
||||
#else
|
||||
ba = MALLOC_N_ATOMIC(Scheme_Object *, newsize);
|
||||
memset((char *)ba, 0, asize);
|
||||
|
|
|
@ -4281,7 +4281,7 @@ static Scheme_Object *get_module_src_name(Scheme_Object *a, Scheme_Object *orig_
|
|||
we can normally cache the result. */
|
||||
{
|
||||
WRAP_POS wraps;
|
||||
Scheme_Object *result, *result_from;
|
||||
Scheme_Object *result;
|
||||
int is_in_module = 0, skip_other_mods = 0, sealed = STX_SEAL_ALL, floating_checked = 0;
|
||||
int no_lexical = !free_id_recur, unsealed_reason = 0;
|
||||
Scheme_Object *phase = orig_phase;
|
||||
|
@ -4430,8 +4430,6 @@ static Scheme_Object *get_module_src_name(Scheme_Object *a, Scheme_Object *orig_
|
|||
} else
|
||||
result = glob_id;
|
||||
}
|
||||
|
||||
result_from = WRAP_POS_FIRST(wraps);
|
||||
}
|
||||
}
|
||||
} else if (SCHEME_BOXP(WRAP_POS_FIRST(wraps))) {
|
||||
|
@ -8364,12 +8362,11 @@ static Scheme_Object *identifier_prune_to_module(int argc, Scheme_Object **argv)
|
|||
while (!WRAP_POS_END_P(w)) {
|
||||
if (SCHEME_BOXP(WRAP_POS_FIRST(w))) {
|
||||
/* Phase shift: */
|
||||
Scheme_Object *vec, *dest, *src;
|
||||
Scheme_Object *vec, *src;
|
||||
|
||||
vec = SCHEME_PTR_VAL(WRAP_POS_FIRST(w));
|
||||
|
||||
src = SCHEME_VEC_ELS(vec)[1];
|
||||
dest = SCHEME_VEC_ELS(vec)[2];
|
||||
|
||||
/* If src is #f, shift is just for phase; no redirection */
|
||||
if (!SCHEME_FALSEP(src)) {
|
||||
|
|
|
@ -4849,11 +4849,10 @@ int scheme_block_until_enable_break(Scheme_Ready_Fun _f, Scheme_Needs_Wakeup_Fun
|
|||
|
||||
static int ready_unless(Scheme_Object *o)
|
||||
{
|
||||
Scheme_Object *unless_evt, *data;
|
||||
Scheme_Object *data;
|
||||
Scheme_Ready_Fun f;
|
||||
|
||||
data = (Scheme_Object *)((void **)o)[0];
|
||||
unless_evt = (Scheme_Object *)((void **)o)[1];
|
||||
f = (Scheme_Ready_Fun)((void **)o)[2];
|
||||
|
||||
return f(data);
|
||||
|
|
Loading…
Reference in New Issue
Block a user