Skip to content

Commit

Permalink
Delete useless 'extern' qualifiers for functions
Browse files Browse the repository at this point in the history
'extern' qualifier is useless for function declarations. Delete
them.

Signed-off-by: Blue Swirl <[email protected]>
  • Loading branch information
blueswirl committed Jan 23, 2011
1 parent ba76a84 commit 64b85a8
Show file tree
Hide file tree
Showing 22 changed files with 126 additions and 131 deletions.
2 changes: 1 addition & 1 deletion cache-utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ struct qemu_cache_conf {

extern struct qemu_cache_conf qemu_cache_conf;

extern void qemu_cache_utils_init(char **envp);
void qemu_cache_utils_init(char **envp);

/* mildly adjusted code from tcg-dyngen.c */
static inline void flush_icache_range(unsigned long start, unsigned long stop)
Expand Down
36 changes: 18 additions & 18 deletions cmd.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,41 +38,41 @@ typedef struct cmdinfo {
extern cmdinfo_t *cmdtab;
extern int ncmds;

extern void help_init(void);
extern void quit_init(void);
void help_init(void);
void quit_init(void);

typedef int (*argsfunc_t)(int index);
typedef int (*checkfunc_t)(const cmdinfo_t *ci);

extern void add_command(const cmdinfo_t *ci);
extern void add_user_command(char *optarg);
extern void add_args_command(argsfunc_t af);
extern void add_check_command(checkfunc_t cf);
void add_command(const cmdinfo_t *ci);
void add_user_command(char *optarg);
void add_args_command(argsfunc_t af);
void add_check_command(checkfunc_t cf);

extern const cmdinfo_t *find_command(const char *cmd);
const cmdinfo_t *find_command(const char *cmd);

extern void command_loop(void);
extern int command_usage(const cmdinfo_t *ci);
extern int command(const cmdinfo_t *ci, int argc, char **argv);
void command_loop(void);
int command_usage(const cmdinfo_t *ci);
int command(const cmdinfo_t *ci, int argc, char **argv);

/* from input.h */
extern char **breakline(char *input, int *count);
extern void doneline(char *input, char **vec);
extern char *fetchline(void);
char **breakline(char *input, int *count);
void doneline(char *input, char **vec);
char *fetchline(void);

extern long long cvtnum(char *s);
extern void cvtstr(double value, char *str, size_t sz);
long long cvtnum(char *s);
void cvtstr(double value, char *str, size_t sz);

extern struct timeval tsub(struct timeval t1, struct timeval t2);
extern double tdiv(double value, struct timeval tv);
struct timeval tsub(struct timeval t1, struct timeval t2);
double tdiv(double value, struct timeval tv);

enum {
DEFAULT_TIME = 0x0,
TERSE_FIXED_TIME = 0x1,
VERBOSE_FIXED_TIME = 0x2
};

extern void timestr(struct timeval *tv, char *str, size_t sz, int flags);
void timestr(struct timeval *tv, char *str, size_t sz, int flags);

extern char *progname;

Expand Down
87 changes: 43 additions & 44 deletions dis-asm.h
Original file line number Diff line number Diff line change
Expand Up @@ -362,48 +362,48 @@ typedef struct disassemble_info {
target address. Return number of bytes processed. */
typedef int (*disassembler_ftype) (bfd_vma, disassemble_info *);

extern int print_insn_big_mips (bfd_vma, disassemble_info*);
extern int print_insn_little_mips (bfd_vma, disassemble_info*);
extern int print_insn_i386 (bfd_vma, disassemble_info*);
extern int print_insn_m68k (bfd_vma, disassemble_info*);
extern int print_insn_z8001 (bfd_vma, disassemble_info*);
extern int print_insn_z8002 (bfd_vma, disassemble_info*);
extern int print_insn_h8300 (bfd_vma, disassemble_info*);
extern int print_insn_h8300h (bfd_vma, disassemble_info*);
extern int print_insn_h8300s (bfd_vma, disassemble_info*);
extern int print_insn_h8500 (bfd_vma, disassemble_info*);
extern int print_insn_alpha (bfd_vma, disassemble_info*);
extern disassembler_ftype arc_get_disassembler (int, int);
extern int print_insn_arm (bfd_vma, disassemble_info*);
extern int print_insn_sparc (bfd_vma, disassemble_info*);
extern int print_insn_big_a29k (bfd_vma, disassemble_info*);
extern int print_insn_little_a29k (bfd_vma, disassemble_info*);
extern int print_insn_i960 (bfd_vma, disassemble_info*);
extern int print_insn_sh (bfd_vma, disassemble_info*);
extern int print_insn_shl (bfd_vma, disassemble_info*);
extern int print_insn_hppa (bfd_vma, disassemble_info*);
extern int print_insn_m32r (bfd_vma, disassemble_info*);
extern int print_insn_m88k (bfd_vma, disassemble_info*);
extern int print_insn_mn10200 (bfd_vma, disassemble_info*);
extern int print_insn_mn10300 (bfd_vma, disassemble_info*);
extern int print_insn_ns32k (bfd_vma, disassemble_info*);
extern int print_insn_big_powerpc (bfd_vma, disassemble_info*);
extern int print_insn_little_powerpc (bfd_vma, disassemble_info*);
extern int print_insn_rs6000 (bfd_vma, disassemble_info*);
extern int print_insn_w65 (bfd_vma, disassemble_info*);
extern int print_insn_d10v (bfd_vma, disassemble_info*);
extern int print_insn_v850 (bfd_vma, disassemble_info*);
extern int print_insn_tic30 (bfd_vma, disassemble_info*);
extern int print_insn_ppc (bfd_vma, disassemble_info*);
extern int print_insn_s390 (bfd_vma, disassemble_info*);
extern int print_insn_crisv32 (bfd_vma, disassemble_info*);
extern int print_insn_crisv10 (bfd_vma, disassemble_info*);
extern int print_insn_microblaze (bfd_vma, disassemble_info*);
extern int print_insn_ia64 (bfd_vma, disassemble_info*);
int print_insn_big_mips (bfd_vma, disassemble_info*);
int print_insn_little_mips (bfd_vma, disassemble_info*);
int print_insn_i386 (bfd_vma, disassemble_info*);
int print_insn_m68k (bfd_vma, disassemble_info*);
int print_insn_z8001 (bfd_vma, disassemble_info*);
int print_insn_z8002 (bfd_vma, disassemble_info*);
int print_insn_h8300 (bfd_vma, disassemble_info*);
int print_insn_h8300h (bfd_vma, disassemble_info*);
int print_insn_h8300s (bfd_vma, disassemble_info*);
int print_insn_h8500 (bfd_vma, disassemble_info*);
int print_insn_alpha (bfd_vma, disassemble_info*);
disassembler_ftype arc_get_disassembler (int, int);
int print_insn_arm (bfd_vma, disassemble_info*);
int print_insn_sparc (bfd_vma, disassemble_info*);
int print_insn_big_a29k (bfd_vma, disassemble_info*);
int print_insn_little_a29k (bfd_vma, disassemble_info*);
int print_insn_i960 (bfd_vma, disassemble_info*);
int print_insn_sh (bfd_vma, disassemble_info*);
int print_insn_shl (bfd_vma, disassemble_info*);
int print_insn_hppa (bfd_vma, disassemble_info*);
int print_insn_m32r (bfd_vma, disassemble_info*);
int print_insn_m88k (bfd_vma, disassemble_info*);
int print_insn_mn10200 (bfd_vma, disassemble_info*);
int print_insn_mn10300 (bfd_vma, disassemble_info*);
int print_insn_ns32k (bfd_vma, disassemble_info*);
int print_insn_big_powerpc (bfd_vma, disassemble_info*);
int print_insn_little_powerpc (bfd_vma, disassemble_info*);
int print_insn_rs6000 (bfd_vma, disassemble_info*);
int print_insn_w65 (bfd_vma, disassemble_info*);
int print_insn_d10v (bfd_vma, disassemble_info*);
int print_insn_v850 (bfd_vma, disassemble_info*);
int print_insn_tic30 (bfd_vma, disassemble_info*);
int print_insn_ppc (bfd_vma, disassemble_info*);
int print_insn_s390 (bfd_vma, disassemble_info*);
int print_insn_crisv32 (bfd_vma, disassemble_info*);
int print_insn_crisv10 (bfd_vma, disassemble_info*);
int print_insn_microblaze (bfd_vma, disassemble_info*);
int print_insn_ia64 (bfd_vma, disassemble_info*);

#if 0
/* Fetch the disassembler for a given BFD, if that support is available. */
extern disassembler_ftype disassembler (bfd *);
disassembler_ftype disassembler(bfd *);
#endif


Expand All @@ -412,21 +412,20 @@ extern disassembler_ftype disassembler (bfd *);

/* Here is a function which callers may wish to use for read_memory_func.
It gets bytes from a buffer. */
extern int buffer_read_memory
(bfd_vma, bfd_byte *, int, struct disassemble_info *);
int buffer_read_memory(bfd_vma, bfd_byte *, int, struct disassemble_info *);

/* This function goes with buffer_read_memory.
It prints a message using info->fprintf_func and info->stream. */
extern void perror_memory (int, bfd_vma, struct disassemble_info *);
void perror_memory(int, bfd_vma, struct disassemble_info *);


/* Just print the address in hex. This is included for completeness even
though both GDB and objdump provide their own (to print symbolic
addresses). */
extern void generic_print_address (bfd_vma, struct disassemble_info *);
void generic_print_address(bfd_vma, struct disassemble_info *);

/* Always true. */
extern int generic_symbol_at_address (bfd_vma, struct disassemble_info *);
int generic_symbol_at_address(bfd_vma, struct disassemble_info *);

/* Macro to initialize a disassemble_info struct. This should be called
by all applications creating such a struct. */
Expand Down
14 changes: 7 additions & 7 deletions envlist.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@ extern "C" {

typedef struct envlist envlist_t;

extern envlist_t *envlist_create(void);
extern void envlist_free(envlist_t *);
extern int envlist_setenv(envlist_t *, const char *);
extern int envlist_unsetenv(envlist_t *, const char *);
extern int envlist_parse_set(envlist_t *, const char *);
extern int envlist_parse_unset(envlist_t *, const char *);
extern char **envlist_to_environ(const envlist_t *, size_t *);
envlist_t *envlist_create(void);
void envlist_free(envlist_t *);
int envlist_setenv(envlist_t *, const char *);
int envlist_unsetenv(envlist_t *, const char *);
int envlist_parse_set(envlist_t *, const char *);
int envlist_parse_unset(envlist_t *, const char *);
char **envlist_to_environ(const envlist_t *, size_t *);

#ifdef __cplusplus
}
Expand Down
2 changes: 1 addition & 1 deletion exec-all.h
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ extern TranslationBlock *tb_phys_hash[CODE_GEN_PHYS_HASH_SIZE];
#if defined(USE_DIRECT_JUMP)

#if defined(_ARCH_PPC)
extern void ppc_tb_set_jmp_target(unsigned long jmp_addr, unsigned long addr);
void ppc_tb_set_jmp_target(unsigned long jmp_addr, unsigned long addr);
#define tb_set_jmp_target1 ppc_tb_set_jmp_target
#elif defined(__i386__) || defined(__x86_64__)
static inline void tb_set_jmp_target1(unsigned long jmp_addr, unsigned long addr)
Expand Down
4 changes: 2 additions & 2 deletions fsdev/qemu-fsdev.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ typedef struct FsTypeListEntry {
QTAILQ_ENTRY(FsTypeListEntry) next;
} FsTypeListEntry;

extern int qemu_fsdev_add(QemuOpts *opts);
extern FsTypeEntry *get_fsdev_fsentry(char *id);
int qemu_fsdev_add(QemuOpts *opts);
FsTypeEntry *get_fsdev_fsentry(char *id);
extern FileOperations local_ops;
#endif
2 changes: 1 addition & 1 deletion hw/file-op-9p.h
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ typedef struct FsContext
struct xattr_operations **xops;
} FsContext;

extern void cred_init(FsCred *);
void cred_init(FsCred *);

typedef struct FileOperations
{
Expand Down
21 changes: 10 additions & 11 deletions hw/hw.h
Original file line number Diff line number Diff line change
Expand Up @@ -799,17 +799,16 @@ extern const VMStateDescription vmstate_i2c_slave;
#define VMSTATE_END_OF_LIST() \
{}

extern int vmstate_load_state(QEMUFile *f, const VMStateDescription *vmsd,
void *opaque, int version_id);
extern void vmstate_save_state(QEMUFile *f, const VMStateDescription *vmsd,
void *opaque);
extern int vmstate_register(DeviceState *dev, int instance_id,
const VMStateDescription *vmsd, void *base);
extern int vmstate_register_with_alias_id(DeviceState *dev,
int instance_id,
const VMStateDescription *vmsd,
void *base, int alias_id,
int required_for_version);
int vmstate_load_state(QEMUFile *f, const VMStateDescription *vmsd,
void *opaque, int version_id);
void vmstate_save_state(QEMUFile *f, const VMStateDescription *vmsd,
void *opaque);
int vmstate_register(DeviceState *dev, int instance_id,
const VMStateDescription *vmsd, void *base);
int vmstate_register_with_alias_id(DeviceState *dev, int instance_id,
const VMStateDescription *vmsd,
void *base, int alias_id,
int required_for_version);
void vmstate_unregister(DeviceState *dev, const VMStateDescription *vmsd,
void *opaque);
#endif
2 changes: 1 addition & 1 deletion hw/mips.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ int g364fb_mm_init(target_phys_addr_t vram_base,
void mipsnet_init(int base, qemu_irq irq, NICInfo *nd);

/* jazz_led.c */
extern void jazz_led_init(target_phys_addr_t base);
void jazz_led_init(target_phys_addr_t base);

/* rc4030.c */
typedef struct rc4030DMAState *rc4030_dma;
Expand Down
16 changes: 7 additions & 9 deletions hw/s390-virtio-bus.h
Original file line number Diff line number Diff line change
Expand Up @@ -58,14 +58,12 @@ typedef struct VirtIOS390Bus {
} VirtIOS390Bus;


extern void s390_virtio_device_update_status(VirtIOS390Device *dev);
void s390_virtio_device_update_status(VirtIOS390Device *dev);

extern VirtIOS390Device *s390_virtio_bus_console(VirtIOS390Bus *bus);
extern VirtIOS390Bus *s390_virtio_bus_init(ram_addr_t *ram_size);
VirtIOS390Device *s390_virtio_bus_console(VirtIOS390Bus *bus);
VirtIOS390Bus *s390_virtio_bus_init(ram_addr_t *ram_size);

extern VirtIOS390Device *s390_virtio_bus_find_vring(VirtIOS390Bus *bus,
ram_addr_t mem,
int *vq_num);
extern VirtIOS390Device *s390_virtio_bus_find_mem(VirtIOS390Bus *bus,
ram_addr_t mem);
extern void s390_virtio_device_sync(VirtIOS390Device *dev);
VirtIOS390Device *s390_virtio_bus_find_vring(VirtIOS390Bus *bus,
ram_addr_t mem, int *vq_num);
VirtIOS390Device *s390_virtio_bus_find_mem(VirtIOS390Bus *bus, ram_addr_t mem);
void s390_virtio_device_sync(VirtIOS390Device *dev);
17 changes: 8 additions & 9 deletions hw/virtio-9p-xattr.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,16 +41,15 @@ extern XattrOperations *mapped_xattr_ops[];
extern XattrOperations *passthrough_xattr_ops[];
extern XattrOperations *none_xattr_ops[];

extern ssize_t v9fs_get_xattr(FsContext *ctx, const char *path,
const char *name, void *value, size_t size);
extern ssize_t v9fs_list_xattr(FsContext *ctx, const char *path,
void *value, size_t vsize);
extern int v9fs_set_xattr(FsContext *ctx, const char *path, const char *name,
ssize_t v9fs_get_xattr(FsContext *ctx, const char *path, const char *name,
void *value, size_t size);
ssize_t v9fs_list_xattr(FsContext *ctx, const char *path, void *value,
size_t vsize);
int v9fs_set_xattr(FsContext *ctx, const char *path, const char *name,
void *value, size_t size, int flags);
extern int v9fs_remove_xattr(FsContext *ctx,
const char *path, const char *name);
extern ssize_t pt_listxattr(FsContext *ctx, const char *path,
char *name, void *value, size_t size);
int v9fs_remove_xattr(FsContext *ctx, const char *path, const char *name);
ssize_t pt_listxattr(FsContext *ctx, const char *path, char *name, void *value,
size_t size);

static inline ssize_t pt_getxattr(FsContext *ctx, const char *path,
const char *name, void *value, size_t size)
Expand Down
4 changes: 2 additions & 2 deletions hw/virtio-9p.h
Original file line number Diff line number Diff line change
Expand Up @@ -495,8 +495,8 @@ typedef struct V9fsReadLinkState
V9fsString target;
} V9fsReadLinkState;

extern size_t pdu_packunpack(void *addr, struct iovec *sg, int sg_count,
size_t offset, size_t size, int pack);
size_t pdu_packunpack(void *addr, struct iovec *sg, int sg_count,
size_t offset, size_t size, int pack);

static inline size_t do_pdu_unpack(void *dst, struct iovec *sg, int sg_count,
size_t offset, size_t size)
Expand Down
8 changes: 4 additions & 4 deletions hw/watchdog.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@ struct WatchdogTimerModel {
typedef struct WatchdogTimerModel WatchdogTimerModel;

/* in hw/watchdog.c */
extern int select_watchdog(const char *p);
extern int select_watchdog_action(const char *action);
extern void watchdog_add_model(WatchdogTimerModel *model);
extern void watchdog_perform_action(void);
int select_watchdog(const char *p);
int select_watchdog_action(const char *action);
void watchdog_add_model(WatchdogTimerModel *model);
void watchdog_perform_action(void);

#endif /* QEMU_WATCHDOG_H */
6 changes: 3 additions & 3 deletions linux-user/arm/nwfpe/fpa11.h
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,9 @@ typedef struct tagFPA11 {

extern FPA11* qemufpa;

extern void resetFPA11(void);
extern void SetRoundingMode(const unsigned int);
extern void SetRoundingPrecision(const unsigned int);
void resetFPA11(void);
void SetRoundingMode(const unsigned int);
void SetRoundingPrecision(const unsigned int);

static inline unsigned int readRegister(unsigned int reg)
{
Expand Down
4 changes: 2 additions & 2 deletions linux-user/arm/nwfpe/fpopcode.h
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,7 @@ static inline float32 getSingleConstant(const unsigned int nIndex)
return float32Constant[nIndex];
}

extern unsigned int getRegisterCount(const unsigned int opcode);
extern unsigned int getDestinationSize(const unsigned int opcode);
unsigned int getRegisterCount(const unsigned int opcode);
unsigned int getDestinationSize(const unsigned int opcode);

#endif
2 changes: 1 addition & 1 deletion qemu-common.h
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ typedef int (*fprintf_function)(FILE *f, const char *fmt, ...)
#ifdef _WIN32
#define fsync _commit
#define lseek _lseeki64
extern int qemu_ftruncate64(int, int64_t);
int qemu_ftruncate64(int, int64_t);
#define ftruncate qemu_ftruncate64

static inline char *realpath(const char *path, char *resolved_path)
Expand Down
2 changes: 1 addition & 1 deletion slirp/slirp.h
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ void if_start(struct ttys *);
#endif

#ifndef HAVE_STRERROR
extern char *strerror(int error);
char *strerror(int error);
#endif

#ifndef HAVE_INDEX
Expand Down
6 changes: 3 additions & 3 deletions target-s390x/cpu.h
Original file line number Diff line number Diff line change
Expand Up @@ -105,9 +105,9 @@ int cpu_s390x_handle_mmu_fault (CPUS390XState *env, target_ulong address, int rw
#define TARGET_VIRT_ADDR_SPACE_BITS 32

#ifndef CONFIG_USER_ONLY
extern int s390_virtio_hypercall(CPUState *env);
extern void kvm_s390_virtio_irq(CPUState *env, int config_change, uint64_t token);
extern CPUState *s390_cpu_addr2state(uint16_t cpu_addr);
int s390_virtio_hypercall(CPUState *env);
void kvm_s390_virtio_irq(CPUState *env, int config_change, uint64_t token);
CPUState *s390_cpu_addr2state(uint16_t cpu_addr);
#endif


Expand Down
Loading

0 comments on commit 64b85a8

Please sign in to comment.