From f34397dadc2d60c32aa1e42ab96950b61ea22f54 Mon Sep 17 00:00:00 2001 From: Marin Ramesa Date: Thu, 21 Nov 2013 22:03:23 +0100 Subject: Modify struct db_variable * ddb/db_macro.c (db_arg_variable): Make function void. * ddb/db_macro.h (db_arg_variable): Declare void return. * ddb/db_task_thread.c (db_set_default_thread): Make function void. (db_get_task_thread): Make function void. * ddb/db_variables.c (db_set_default_thread, db_get_task_thread, db_arg_variable): Declare void return. (db_read_write_variable): Use void in initialization. * ddb/db_variables.h (db_variable): Make third member return void. [FCN_NULL]: Define void. * i386/i386/db_trace.c (db_i386_reg_value): Make function void. --- ddb/db_macro.c | 4 ++-- ddb/db_macro.h | 2 +- ddb/db_task_thread.c | 12 ++++++------ ddb/db_variables.c | 8 ++++---- ddb/db_variables.h | 4 ++-- i386/i386/db_trace.c | 4 ++-- 6 files changed, 17 insertions(+), 17 deletions(-) diff --git a/ddb/db_macro.c b/ddb/db_macro.c index 5b4264c..9d14b12 100644 --- a/ddb/db_macro.c +++ b/ddb/db_macro.c @@ -165,7 +165,7 @@ db_exec_macro(name) return(0); } -long +void /* ARGSUSED */ db_arg_variable(vp, valuep, flag, ap) struct db_variable *vp; @@ -181,7 +181,7 @@ db_arg_variable(vp, valuep, flag, ap) *valuep = db_macro_args[db_macro_level][ap->suffix[0]-1]; else db_macro_args[db_macro_level][ap->suffix[0]-1] = *valuep; - return(0); + return; } #endif /* MACH_KDB */ diff --git a/ddb/db_macro.h b/ddb/db_macro.h index da5626f..525eead 100644 --- a/ddb/db_macro.h +++ b/ddb/db_macro.h @@ -32,7 +32,7 @@ extern void db_show_macro (void); extern int db_exec_macro (char *name); -extern long db_arg_variable ( +extern void db_arg_variable ( struct db_variable *vp, db_expr_t *valuep, int flag, diff --git a/ddb/db_task_thread.c b/ddb/db_task_thread.c index 41f11cc..21ec3dd 100644 --- a/ddb/db_task_thread.c +++ b/ddb/db_task_thread.c @@ -245,7 +245,7 @@ db_init_default_thread(void) * in the command line */ /* ARGSUSED */ -long +void db_set_default_thread(vp, valuep, flag) struct db_variable *vp; db_expr_t *valuep; @@ -255,7 +255,7 @@ db_set_default_thread(vp, valuep, flag) if (flag != DB_VAR_SET) { *valuep = (db_expr_t) db_default_thread; - return(0); + return; } thread = (thread_t) *valuep; if (thread != THREAD_NULL && !db_check_thread_address_valid(thread)) @@ -264,13 +264,13 @@ db_set_default_thread(vp, valuep, flag) db_default_thread = thread; if (thread) db_default_task = thread->task; - return(0); + return; } /* * convert $taskXXX[.YYY] type DDB variable to task or thread address */ -long +void db_get_task_thread(vp, valuep, flag, ap) struct db_variable *vp; db_expr_t *valuep; @@ -291,7 +291,7 @@ db_get_task_thread(vp, valuep, flag, ap) } if (ap->level <= 1) { *valuep = (db_expr_t) task; - return(0); + return; } if ((thread = db_lookup_thread_id(task, ap->suffix[1])) == THREAD_NULL){ db_printf("no such thread($task%d.%d)\n", @@ -300,7 +300,7 @@ db_get_task_thread(vp, valuep, flag, ap) /* NOTREACHED */ } *valuep = (db_expr_t) thread; - return(0); + return; } #endif /* MACH_KDB */ diff --git a/ddb/db_variables.c b/ddb/db_variables.c index 3a12e4a..59f1ddf 100644 --- a/ddb/db_variables.c +++ b/ddb/db_variables.c @@ -46,9 +46,9 @@ extern db_expr_t db_radix; extern db_expr_t db_max_width; extern db_expr_t db_tab_stop_width; extern db_expr_t db_max_line; -extern long db_set_default_thread(); -extern long db_get_task_thread(); -extern long db_arg_variable(); +extern void db_set_default_thread(); +extern void db_get_task_thread(); +extern void db_arg_variable(); #define DB_NWORK 32 /* number of work variable */ @@ -184,7 +184,7 @@ db_read_write_variable(vp, valuep, rw_flag, ap) int rw_flag; db_var_aux_param_t ap; { - long (*func)() = vp->fcn; + void (*func)() = vp->fcn; struct db_var_aux_param aux_param; if (ap == 0) { diff --git a/ddb/db_variables.h b/ddb/db_variables.h index 81d4cfe..533c064 100644 --- a/ddb/db_variables.h +++ b/ddb/db_variables.h @@ -42,7 +42,7 @@ struct db_variable { char *name; /* Name of variable */ db_expr_t *valuep; /* pointer to value of variable */ /* function to call when reading/writing */ - long (*fcn)(struct db_variable *, db_expr_t *, int, db_var_aux_param_t); + void (*fcn)(struct db_variable *, db_expr_t *, int, db_var_aux_param_t); short min_level; /* number of minimum suffix levels */ short max_level; /* number of maximum suffix levels */ short low; /* low value of level 1 suffix */ @@ -50,7 +50,7 @@ struct db_variable { #define DB_VAR_GET 0 #define DB_VAR_SET 1 }; -#define FCN_NULL ((long (*)())0) +#define FCN_NULL ((void (*)())0) #define DB_VAR_LEVEL 3 /* maximum number of suffix level */ diff --git a/i386/i386/db_trace.c b/i386/i386/db_trace.c index 8bad6b0..4c56938 100644 --- a/i386/i386/db_trace.c +++ b/i386/i386/db_trace.c @@ -46,7 +46,7 @@ #include "trap.h" -long +void db_i386_reg_value( struct db_variable *vp, db_expr_t *valuep, @@ -125,7 +125,7 @@ db_lookup_i386_kreg( return 0; } -long +void db_i386_reg_value( struct db_variable *vp, db_expr_t *valuep, -- cgit v1.2.3