* dache.c (struct dcache_block): Change data member from unsigned char

to char, since everything passed in and out of dcache is char or casted
	to appropriate type anyway.
	(dcache_alloc):  Move assignment of db out of test and combine separate
	tests into if-else.
	(dcache_peek_byte):  Change ptr from unsigned char* to char*.
	(dcache_peek_byte):  Remove now unnecessary cast in read_memory call.
	(dcache_peek):  Change cast of incoming data arg.
	(dcache_poke):  Change cast of addr of incoming data arg.
	(dcache_info):  Mask data passed to printf_filtered to lsbyte only.
	(dcache_info):  Change printf_filtered arg from "% 2x" to " %2x".
	* target.c (debug_to_thread_alive): Change return type to int and
	return zero, for type compatibility with other *_thread_alive funcs.
	(cleanup_target): Change cast of ignore function to match type of the
	to_thread_alive member.
	* defs.h (error_hook): Add ATTR_NORETURN.
	* defs.h (NORETURN, ATTR_NORETURN):  Switch from volatile to
	__attribute__ method with gcc 2.7, to avoid gcc 2.6.3 bug.
	* remote.c (remote_wait):  Cast first arg to strtol, strchr, and strncmp
	to "const char *" from "unsigned char *".
	(remote_wait):  Cast arg to putpkt and strcpy from "unsigned char *" to
	"char *".
	(remote_wait):  Change printf format for long arg from "%d" to "%ld".
	(getpkt):  Remove unused variable "bp".
	(remote_fetch_word, remote_store_word):  Ifdef out apparently unused
	functions.
	* breakpoint.c (watchpoint_check):  Removed unused variables
	"saved_level" and "saved_frame".
	* valops.c (value_arg_coerce):  Add other enum TYPE_CODE_* and
	default cases to switch for completeness.
	* infrun.c (wait_for_inferior):  Enclose "have_waited" label
	in #ifdef that matches the one in which it is referenced.
	* ser-unix.c (hardwire_noflush_set_tty_state):  Enclose otherwise
	unused variable "state" in #ifdef that matches one in which it is
	referenced.
	* eval.c (evaluate_subexp_standard):  Remove unused variable "var".
	* eval.c (evaluate_subexp_standard):  Remove unused variable "tmp_symbol".
	* valarith.c (value_subscript):  Remove unused variable "lowerbound",
	which is redeclared in a nested scope prior to use.
	* printcmd.c (print_frame_nameless_args):  Use "%ld" to print long
	arg, not "%d".
	* {mem-break.c, remote-pa.c, remote.c, saber.suppress}:
	Remove unused static var "check_break_insn_size".
	* buildsym.c (finish_block):  Add other enum LOC_* and default
	cases to switch for completeness.
	ch-lang.c (type_lower_upper):  Removed unused label "retry".
	Add other enum TYPE_* and default cases to switch for completeness.
	* f-typeprint.c (f_type_print_args):  Ifdef out unused function
	that may be used someday when Fortran support is complete.
	* ch-valprint.c (chill_print_type_scalar):  Add other enum
	TYPE_* and default cases to switch for completeness.
	(chill_val_print):  Remove unused local var "high_bound" that
	is redeclared in a nested scope prior to use.
	(chill_var_print):  Use "%ld" to print long arg, not "%d".
	* regex.c (re_compile_fastmap, re_match_2):  Add remaining enum types
	and default to switches for completeness.
	* minsyms.c (lookup_minimal_symbol_text): Delete unused variable
	"trampoline_symbol".
	(prim_record_minimal_symbol_and_info):  Return NULL rather than trash.
	* elfread.c (elf_symtab_read):  Don't dereference NULL returns from
	record_minimal_symbol_and_info.
	* f-lang.c (saved_function_list_end):  Ifdef out unused variable
	that may be used someday.
	* f-valprint.c (f_val_print):  Remove unused local variable "straddr".
This commit is contained in:
Fred Fish 1995-07-18 04:38:06 +00:00
parent 242eee7a0b
commit 6b14af2bc6
15 changed files with 178 additions and 26 deletions

View file

@ -112,7 +112,7 @@ struct dcache_block
{
struct dcache_block *p; /* next in list */
unsigned int addr; /* Address for which data is recorded. */
unsigned char data[LINE_SIZE]; /* bytes at given address */
char data[LINE_SIZE]; /* bytes at given address */
unsigned char state[LINE_SIZE]; /* what state the data is in */
/* whether anything in state is dirty - used to speed up the
@ -272,14 +272,14 @@ dcache_alloc (dcache)
abort ();
/* Take something from the free list */
if (db = dcache->free_head)
db = dcache->free_head;
if (db)
{
dcache->free_head = db->p;
}
if (!db)
else
{
/* Nothing left on free list, so grab on from the valid list */
/* Nothing left on free list, so grab one from the valid list */
db = dcache->valid_head;
dcache->valid_head = db->p;
@ -306,7 +306,7 @@ int
dcache_peek_byte (dcache, addr, ptr)
DCACHE *dcache;
CORE_ADDR addr;
unsigned char *ptr;
char *ptr;
{
register struct dcache_block *db = dcache_hit (dcache, addr);
int ok=1;
@ -327,7 +327,7 @@ dcache_peek_byte (dcache, addr, ptr)
int try =
(*dcache->read_memory)
(db->addr + done,
(unsigned char *) db->data + done,
db->data + done,
LINE_SIZE - done);
if (try == 0)
return 0;
@ -353,7 +353,7 @@ dcache_peek (dcache, addr, data)
CORE_ADDR addr;
int *data;
{
unsigned char *dp = (unsigned char *) data;
char *dp = (char *) data;
int i;
for (i = 0; i < sizeof (int); i++)
{
@ -431,7 +431,7 @@ dcache_poke (dcache, addr, data)
CORE_ADDR addr;
int data;
{
unsigned char *dp = (unsigned char *) (&data);
char *dp = (char *) (&data);
int i;
for (i = 0; i < sizeof (int); i++)
{
@ -533,11 +533,11 @@ dcache_info (exp, tty)
p->addr, p->refs);
for (j = 0; j < LINE_SIZE; j++)
printf_filtered ("%02x", p->data[j]);
printf_filtered ("%02x", p->data[j] & 0xFF);
printf_filtered ("\n");
for (j = 0; j < LINE_SIZE; j++)
printf_filtered ("% 2x", p->state[j]);
printf_filtered (" %2x", p->state[j]);
printf_filtered ("\n");
}
}