On Mon, Mar 20, 2023 at 02:42:18PM +0100, Philippe Mathieu-Daudé wrote:
By default, C function prototypes declared in headers are visible,
so there is no need to declare them as 'extern' functions.
Remove this redundancy in a single bulk commit; do not modify:
- meson.build (used to check function availability at runtime)
- pc-bios
- libdecnumber
- *.c
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
block/dmg.h | 8 +++----
bsd-user/bsd-file.h | 6 ++---
crypto/hmacpriv.h | 13 +++++------
hw/xen/xen_pt.h | 8 +++----
include/crypto/secret_common.h | 14 +++++-------
include/exec/page-vary.h | 4 ++--
include/hw/misc/aspeed_scu.h | 2 +-
include/hw/nvram/npcm7xx_otp.h | 4 ++--
include/hw/qdev-core.h | 4 ++--
include/qemu/crc-ccitt.h | 4 ++--
include/qemu/osdep.h | 2 +-
include/qemu/rcu.h | 14 ++++++------
include/qemu/sys_membarrier.h | 4 ++--
include/qemu/uri.h | 6 ++---
include/sysemu/accel-blocker.h | 14 ++++++------
include/sysemu/os-win32.h | 4 ++--
include/user/safe-syscall.h | 4 ++--
target/i386/sev.h | 6 ++---
target/mips/cpu.h | 4 ++--
tcg/tcg-internal.h | 4 ++--
tests/tcg/minilib/minilib.h | 2 +-
include/exec/memory_ldst.h.inc | 42 +++++++++++++++++-----------------
roms/seabios | 2 +-
Accidental submodule commit.,
23 files changed, 84 insertions(+), 91 deletions(-)
diff --git a/block/dmg.h b/block/dmg.h
index e488601b62..ed209b5dec 100644
--- a/block/dmg.h
+++ b/block/dmg.h
@@ -51,10 +51,10 @@ typedef struct BDRVDMGState {
z_stream zstream;
} BDRVDMGState;
-extern int (*dmg_uncompress_bz2)(char *next_in, unsigned int avail_in,
- char *next_out, unsigned int avail_out);
+int (*dmg_uncompress_bz2)(char *next_in, unsigned int avail_in,
+ char *next_out, unsigned int avail_out);
-extern int (*dmg_uncompress_lzfse)(char *next_in, unsigned int avail_in,
- char *next_out, unsigned int avail_out);
+int (*dmg_uncompress_lzfse)(char *next_in, unsigned int avail_in,
+ char *next_out, unsigned int avail_out);
These are variable declarations, so with this change you'll get multiple
copies of the variable if this header is included from multiple source
files. IOW, the 'extern' usage is correct.