Removed further warnings about uninitialized or unused variables and functions

This commit is contained in:
Juan Jose Garcia Ripoll 2012-04-11 23:04:27 +02:00
parent a7eead6ba7
commit fbd3587b1a
15 changed files with 21 additions and 48 deletions

View file

@ -48,8 +48,6 @@ static const cl_object ecl_aet_name[] = {
@'base-char' /* aet_bc */
};
static void check_displaced (cl_object dlist, cl_object orig, cl_index newdim);
static void FEbad_aet() ecl_attr_noreturn;
static void
@ -731,12 +729,6 @@ address_inc(void *address, cl_fixnum inc, cl_elttype elt_type)
}
}
static void *
array_address(cl_object x, cl_index inc)
{
return address_inc(x->array.self.t, inc, x->array.elttype);
}
cl_object
cl_array_element_type(cl_object a)
{

View file

@ -451,13 +451,6 @@ static cl_object dispatch63 (cl_narg narg, cl_object x0, cl_object x1, cl_object
return fun->cfunfixed.entry_fixed(x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17, x18, x19, x20, x21, x22, x23, x24, x25, x26, x27, x28, x29, x30, x31, x32, x33, x34, x35, x36, x37, x38, x39, x40, x41, x42, x43, x44, x45, x46, x47, x48, x49, x50, x51, x52, x53, x54, x55, x56, x57, x58, x59, x60, x61, x62);
}
static cl_object dispatch64 (cl_narg narg, cl_object x0, cl_object x1, cl_object x2, cl_object x3, cl_object x4, cl_object x5, cl_object x6, cl_object x7, cl_object x8, cl_object x9, cl_object x10, cl_object x11, cl_object x12, cl_object x13, cl_object x14, cl_object x15, cl_object x16, cl_object x17, cl_object x18, cl_object x19, cl_object x20, cl_object x21, cl_object x22, cl_object x23, cl_object x24, cl_object x25, cl_object x26, cl_object x27, cl_object x28, cl_object x29, cl_object x30, cl_object x31, cl_object x32, cl_object x33, cl_object x34, cl_object x35, cl_object x36, cl_object x37, cl_object x38, cl_object x39, cl_object x40, cl_object x41, cl_object x42, cl_object x43, cl_object x44, cl_object x45, cl_object x46, cl_object x47, cl_object x48, cl_object x49, cl_object x50, cl_object x51, cl_object x52, cl_object x53, cl_object x54, cl_object x55, cl_object x56, cl_object x57, cl_object x58, cl_object x59, cl_object x60, cl_object x61, cl_object x62, cl_object x63) {
const cl_env_ptr the_env = ecl_process_env();
cl_object fun = the_env->function;
if (ecl_unlikely(narg != 64)) FEwrong_num_arguments(fun);
return fun->cfunfixed.entry_fixed(x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17, x18, x19, x20, x21, x22, x23, x24, x25, x26, x27, x28, x29, x30, x31, x32, x33, x34, x35, x36, x37, x38, x39, x40, x41, x42, x43, x44, x45, x46, x47, x48, x49, x50, x51, x52, x53, x54, x55, x56, x57, x58, x59, x60, x61, x62, x63);
}
static cl_objectfn dispatch_table[64] = {
(cl_objectfn)dispatch0,
(cl_objectfn)dispatch1,

View file

@ -200,7 +200,7 @@ ecl_char_eq(cl_object x, cl_object y)
@)
static cl_object
Lchar_cmp(cl_narg narg, int s, int t, cl_va_list args)
Lchar_cmp(cl_env_ptr env, cl_narg narg, int s, int t, cl_va_list args)
{
cl_object c, d;
@ -210,9 +210,9 @@ Lchar_cmp(cl_narg narg, int s, int t, cl_va_list args)
for (; --narg; c = d) {
d = cl_va_arg(args);
if (s*ecl_char_cmp(d, c) < t)
@(return Cnil)
ecl_return1(env, Cnil);
}
@(return Ct)
ecl_return1(env, Ct);
}
int
@ -226,22 +226,22 @@ ecl_char_cmp(cl_object x, cl_object y)
@(defun char< (&rest args)
@
return Lchar_cmp(narg, 1, 1, args);
return Lchar_cmp(the_env, narg, 1, 1, args);
@)
@(defun char> (&rest args)
@
return Lchar_cmp(narg,-1, 1, args);
return Lchar_cmp(the_env, narg,-1, 1, args);
@)
@(defun char<= (&rest args)
@
return Lchar_cmp(narg, 1, 0, args);
return Lchar_cmp(the_env, narg, 1, 0, args);
@)
@(defun char>= (&rest args)
@
return Lchar_cmp(narg,-1, 0, args);
return Lchar_cmp(the_env, narg,-1, 0, args);
@)
@(defun char_equal (c &rest cs)
@ -283,7 +283,7 @@ ecl_char_equal(cl_object x, cl_object y)
@)
static cl_object
Lchar_compare(cl_narg narg, int s, int t, cl_va_list args)
Lchar_compare(cl_env_ptr env, cl_narg narg, int s, int t, cl_va_list args)
{
cl_object c, d;
@ -294,9 +294,9 @@ Lchar_compare(cl_narg narg, int s, int t, cl_va_list args)
for (; --narg; c = d) {
d = cl_va_arg(args);
if (s*ecl_char_compare(d, c) < t)
@(return Cnil)
ecl_return1(env, Cnil);
}
@(return Ct)
ecl_return1(env, Ct);
}
int
@ -315,22 +315,22 @@ ecl_char_compare(cl_object x, cl_object y)
@(defun char-lessp (&rest args)
@
return Lchar_compare(narg, 1, 1, args);
return Lchar_compare(the_env, narg, 1, 1, args);
@)
@(defun char-greaterp (&rest args)
@
return Lchar_compare(narg,-1, 1, args);
return Lchar_compare(the_env, narg,-1, 1, args);
@)
@(defun char-not-greaterp (&rest args)
@
return Lchar_compare(narg, 1, 0, args);
return Lchar_compare(the_env, narg, 1, 0, args);
@)
@(defun char-not-lessp (&rest args)
@
return Lchar_compare(narg,-1, 0, args);
return Lchar_compare(the_env, narg,-1, 0, args);
@)

View file

@ -69,7 +69,7 @@ static ecl_cache_record_ptr
search_slot_index(const cl_env_ptr env, cl_object gfun, cl_object instance)
{
ecl_cache_ptr cache = env->slot_cache;
cl_object vector = fill_spec_vector(cache->keys, gfun, instance);
fill_spec_vector(cache->keys, gfun, instance);
return ecl_search_cache(cache);
}
@ -85,9 +85,10 @@ add_new_index(const cl_env_ptr env, cl_object gfun, cl_object instance, cl_objec
return 0;
}
{
ecl_cache_record_ptr e;
ecl_cache_ptr cache = env->slot_cache;
cl_object vector = fill_spec_vector(cache->keys, gfun, instance);
ecl_cache_record_ptr e = ecl_search_cache(cache);
fill_spec_vector(cache->keys, gfun, instance);
e = ecl_search_cache(cache);
e->key = cl_copy_seq(cache->keys);
e->value = index;
return e;

View file

@ -78,7 +78,6 @@ ecl_cache_ptr
ecl_make_cache(cl_index key_size, cl_index cache_size)
{
ecl_cache_ptr cache = ecl_alloc(sizeof(struct ecl_cache));
cl_object table;
cache->keys =
si_make_vector(Ct, /* element type */
MAKE_FIXNUM(key_size), /* Maximum size */

View file

@ -5298,13 +5298,6 @@ io_error(cl_object strm)
1, strm);
}
static void
character_size_overflow(cl_object strm, ecl_character c)
{
FEerror("Tried to write a character ~S in a ~A stream.", 2,
CODE_CHAR(c), cl_stream_external_format(strm));
}
static void
wrong_file_handler(cl_object strm)
{

View file

@ -67,7 +67,6 @@ ecl_integer_divide(cl_object x, cl_object y)
cl_object
ecl_gcd(cl_object x, cl_object y)
{
cl_object gcd;
ECL_WITH_TEMP_BIGNUM(x_big,1);
ECL_WITH_TEMP_BIGNUM(y_big,1);

View file

@ -768,7 +768,6 @@ cl_decode_float(cl_object x)
switch (tx) {
case t_singlefloat: {
f = sf(x);
FLOAT:
if (f >= 0.0) {
s = 1;
} else {

View file

@ -527,7 +527,6 @@ potential_export_conflict(cl_object name, cl_object s, cl_object p)
void
cl_export2(cl_object s, cl_object p)
{
cl_object x;
int intern_flag, error;
cl_object other_p, name = ecl_symbol_name(s);
p = si_coerce_to_package(p);

View file

@ -474,7 +474,6 @@ static printer dispatch[FREE+1] = {
cl_object
si_write_ugly_object(cl_object x, cl_object stream)
{
int t;
if (x == OBJNULL) {
if (ecl_print_readably())
FEprint_not_readable(x);

View file

@ -103,7 +103,6 @@ mp_barrier_arrivers_count(cl_object barrier)
static cl_object
barrier_wait_condition(cl_env_ptr env, cl_object barrier)
{
cl_object output;
/* We were signaled */
if (env->own_process->process.waiting_for != barrier)
return Ct;

View file

@ -200,6 +200,7 @@ thread_cleanup(void *aux)
/* No signals from here on */
{
sigset_t new[1];
sigemptyset(new);
sigaddset(new, ecl_option_values[ECL_OPT_SIGNAL_HANDLING_THREAD]);
pthread_sigmask(SIG_BLOCK, new, NULL);
}
@ -548,6 +549,7 @@ mp_exit_process(void)
*/
const cl_env_ptr the_env = ecl_process_env();
ecl_unwind(the_env, the_env->frs_org);
/* Never reached */
}
cl_object

View file

@ -80,7 +80,6 @@ mp_semaphore_wait_count(cl_object semaphore)
{
cl_fixnum n = fixnnint(count);
cl_env_ptr env = ecl_process_env();
cl_object own_process = env->own_process;
unlikely_if (type_of(semaphore) != t_semaphore) {
FEerror_not_a_semaphore(semaphore);
}

View file

@ -384,7 +384,6 @@ make_windows_handle(HANDLE h)
cl_object stream_write;
cl_object stream_read;
cl_object exit_status = Cnil;
cl_object external_process;
@
command = si_copy_to_simple_base_string(command);
argv = cl_mapcar(2, @'si::copy-to-simple-base-string', argv);

View file

@ -1701,7 +1701,7 @@ extern ECL_API void ecl_tcp_close_all(void);
#ifdef ECL_THREADS
extern ECL_API cl_object mp_own_process(void) __attribute__((const));
extern ECL_API cl_object mp_all_processes(void);
extern ECL_API cl_object mp_exit_process(void) /*ecl_attr_noreturn*/;
extern ECL_API cl_object mp_exit_process(void) ecl_attr_noreturn;
extern ECL_API cl_object mp_interrupt_process(cl_object process, cl_object function);
extern ECL_API cl_object mp_make_process _ARGS((cl_narg narg, ...));
extern ECL_API cl_object mp_process_active_p(cl_object process);