forked from Imagelibrary/binutils-gdb
sim/erc32: Use int32_t as event callback argument
Clang generates a warning if an argument is passed to a function without
prototype (zero arguments, even without (void)). Such calls are deprecated
forms of indefinite arguments passing ("-Wdeprecated-non-prototype").
On the default configuration, it causes a build failure (unless
"--disable-werror" is specified).
To fix that, this commit makes struct evcell to use int32_t as a callback
(cfunc) argument of an event. int32_t is chosen because "event" function
accepts "int32_t arg".
This commit is contained in:
@@ -124,7 +124,7 @@ struct pstate {
|
||||
};
|
||||
|
||||
struct evcell {
|
||||
void (*cfunc) ();
|
||||
void (*cfunc) (int32_t);
|
||||
int32_t arg;
|
||||
uint64_t time;
|
||||
struct evcell *nxt;
|
||||
@@ -183,7 +183,7 @@ extern void init_signals (void);
|
||||
struct disassemble_info;
|
||||
extern void dis_mem (uint32_t addr, uint32_t len,
|
||||
struct disassemble_info *info);
|
||||
extern void event (void (*cfunc) (), int32_t arg, uint64_t delta);
|
||||
extern void event (void (*cfunc) (int32_t), int32_t arg, uint64_t delta);
|
||||
extern void set_int (int32_t level, void (*callback) (), int32_t arg);
|
||||
extern void advance_time (struct pstate *sregs);
|
||||
extern uint32_t now (void);
|
||||
|
||||
Reference in New Issue
Block a user