mirror of
https://github.com/izzy2lost/xemu.git
synced 2026-07-06 00:20:22 -07:00
Merge tag 'fixes-pull-request' of gitlab.com:marcandre.lureau/qemu into staging
Fixes and cleanups for 7.0 Hi, A collection of fixes & cleanup patches that should be safe for 7.0 inclusion. # gpg: Signature made Tue 22 Mar 2022 12:11:30 GMT # gpg: using RSA key 87A9BD933F87C606D276F62DDAE8E10975969CE5 # gpg: issuer "marcandre.lureau@redhat.com" # gpg: Good signature from "Marc-André Lureau <marcandre.lureau@redhat.com>" [full] # gpg: aka "Marc-André Lureau <marcandre.lureau@gmail.com>" [full] # Primary key fingerprint: 87A9 BD93 3F87 C606 D276 F62D DAE8 E109 7596 9CE5 * tag 'fixes-pull-request' of gitlab.com:marcandre.lureau/qemu: (21 commits) qapi: remove needless include Remove trailing ; after G_DEFINE_AUTO macro tests: remove needless include error: use GLib to remember the program name qga: remove bswap.h include qapi: remove needless include meson: fix CONFIG_ATOMIC128 check meson: move int128 checks from configure qapi: remove needless include util: remove the net/net.h dependency util: remove needless includes scripts/modinfo-collect: remove unused/dead code Move HOST_LONG_BITS to compiler.h Simplify HOST_LONG_BITS compiler.h: replace QEMU_SENTINEL with G_GNUC_NULL_TERMINATED compiler.h: replace QEMU_WARN_UNUSED_RESULT with G_GNUC_WARN_UNUSED_RESULT Replace GCC_FMT_ATTR with G_GNUC_PRINTF Drop qemu_foo() socket API wrapper m68k/nios2-semi: fix gettimeofday() result check vl: typo fix in a comment ... Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
+2
-2
@@ -72,7 +72,7 @@ struct alsa_params_obt {
|
||||
snd_pcm_uframes_t samples;
|
||||
};
|
||||
|
||||
static void GCC_FMT_ATTR (2, 3) alsa_logerr (int err, const char *fmt, ...)
|
||||
static void G_GNUC_PRINTF (2, 3) alsa_logerr (int err, const char *fmt, ...)
|
||||
{
|
||||
va_list ap;
|
||||
|
||||
@@ -83,7 +83,7 @@ static void GCC_FMT_ATTR (2, 3) alsa_logerr (int err, const char *fmt, ...)
|
||||
AUD_log (AUDIO_CAP, "Reason: %s\n", snd_strerror (err));
|
||||
}
|
||||
|
||||
static void GCC_FMT_ATTR (3, 4) alsa_logerr2 (
|
||||
static void G_GNUC_PRINTF (3, 4) alsa_logerr2 (
|
||||
int err,
|
||||
const char *typ,
|
||||
const char *fmt,
|
||||
|
||||
+2
-2
@@ -91,8 +91,8 @@ typedef struct QEMUAudioTimeStamp {
|
||||
uint64_t old_ts;
|
||||
} QEMUAudioTimeStamp;
|
||||
|
||||
void AUD_vlog (const char *cap, const char *fmt, va_list ap) GCC_FMT_ATTR(2, 0);
|
||||
void AUD_log (const char *cap, const char *fmt, ...) GCC_FMT_ATTR(2, 3);
|
||||
void AUD_vlog (const char *cap, const char *fmt, va_list ap) G_GNUC_PRINTF(2, 0);
|
||||
void AUD_log (const char *cap, const char *fmt, ...) G_GNUC_PRINTF(2, 3);
|
||||
|
||||
void AUD_register_card (const char *name, QEMUSoundCard *card);
|
||||
void AUD_remove_card (QEMUSoundCard *card);
|
||||
|
||||
+2
-2
@@ -211,7 +211,7 @@ static void coreaudio_logstatus (OSStatus status)
|
||||
AUD_log (AUDIO_CAP, "Reason: %s\n", str);
|
||||
}
|
||||
|
||||
static void GCC_FMT_ATTR (2, 3) coreaudio_logerr (
|
||||
static void G_GNUC_PRINTF (2, 3) coreaudio_logerr (
|
||||
OSStatus status,
|
||||
const char *fmt,
|
||||
...
|
||||
@@ -226,7 +226,7 @@ static void GCC_FMT_ATTR (2, 3) coreaudio_logerr (
|
||||
coreaudio_logstatus (status);
|
||||
}
|
||||
|
||||
static void GCC_FMT_ATTR (3, 4) coreaudio_logerr2 (
|
||||
static void G_GNUC_PRINTF (3, 4) coreaudio_logerr2 (
|
||||
OSStatus status,
|
||||
const char *typ,
|
||||
const char *fmt,
|
||||
|
||||
+2
-2
@@ -222,7 +222,7 @@ static void dsound_log_hresult (HRESULT hr)
|
||||
AUD_log (AUDIO_CAP, "Reason: %s\n", str);
|
||||
}
|
||||
|
||||
static void GCC_FMT_ATTR (2, 3) dsound_logerr (
|
||||
static void G_GNUC_PRINTF (2, 3) dsound_logerr (
|
||||
HRESULT hr,
|
||||
const char *fmt,
|
||||
...
|
||||
@@ -237,7 +237,7 @@ static void GCC_FMT_ATTR (2, 3) dsound_logerr (
|
||||
dsound_log_hresult (hr);
|
||||
}
|
||||
|
||||
static void GCC_FMT_ATTR (3, 4) dsound_logerr2 (
|
||||
static void G_GNUC_PRINTF (3, 4) dsound_logerr2 (
|
||||
HRESULT hr,
|
||||
const char *typ,
|
||||
const char *fmt,
|
||||
|
||||
+2
-2
@@ -63,7 +63,7 @@ struct oss_params {
|
||||
int fragsize;
|
||||
};
|
||||
|
||||
static void GCC_FMT_ATTR (2, 3) oss_logerr (int err, const char *fmt, ...)
|
||||
static void G_GNUC_PRINTF (2, 3) oss_logerr (int err, const char *fmt, ...)
|
||||
{
|
||||
va_list ap;
|
||||
|
||||
@@ -74,7 +74,7 @@ static void GCC_FMT_ATTR (2, 3) oss_logerr (int err, const char *fmt, ...)
|
||||
AUD_log (AUDIO_CAP, "Reason: %s\n", strerror (err));
|
||||
}
|
||||
|
||||
static void GCC_FMT_ATTR (3, 4) oss_logerr2 (
|
||||
static void G_GNUC_PRINTF (3, 4) oss_logerr2 (
|
||||
int err,
|
||||
const char *typ,
|
||||
const char *fmt,
|
||||
|
||||
+1
-1
@@ -43,7 +43,7 @@ typedef struct {
|
||||
|
||||
static void qpa_conn_fini(PAConnection *c);
|
||||
|
||||
static void GCC_FMT_ATTR (2, 3) qpa_logerr (int err, const char *fmt, ...)
|
||||
static void G_GNUC_PRINTF (2, 3) qpa_logerr (int err, const char *fmt, ...)
|
||||
{
|
||||
va_list ap;
|
||||
|
||||
|
||||
+1
-1
@@ -55,7 +55,7 @@ typedef struct SDLVoiceIn {
|
||||
SDL_AudioDeviceID devid;
|
||||
} SDLVoiceIn;
|
||||
|
||||
static void GCC_FMT_ATTR (1, 2) sdl_logerr (const char *fmt, ...)
|
||||
static void G_GNUC_PRINTF (1, 2) sdl_logerr (const char *fmt, ...)
|
||||
{
|
||||
va_list ap;
|
||||
|
||||
|
||||
+1
-1
@@ -44,7 +44,7 @@ typedef struct BlkverifyRequest {
|
||||
QEMUIOVector *raw_qiov; /* cloned I/O vector for raw file */
|
||||
} BlkverifyRequest;
|
||||
|
||||
static void GCC_FMT_ATTR(2, 3) blkverify_err(BlkverifyRequest *r,
|
||||
static void G_GNUC_PRINTF(2, 3) blkverify_err(BlkverifyRequest *r,
|
||||
const char *fmt, ...)
|
||||
{
|
||||
va_list ap;
|
||||
|
||||
+11
-9
@@ -33,9 +33,11 @@
|
||||
|
||||
static int64_t alloc_clusters_noref(BlockDriverState *bs, uint64_t size,
|
||||
uint64_t max);
|
||||
static int QEMU_WARN_UNUSED_RESULT update_refcount(BlockDriverState *bs,
|
||||
int64_t offset, int64_t length, uint64_t addend,
|
||||
bool decrease, enum qcow2_discard_type type);
|
||||
|
||||
G_GNUC_WARN_UNUSED_RESULT
|
||||
static int update_refcount(BlockDriverState *bs,
|
||||
int64_t offset, int64_t length, uint64_t addend,
|
||||
bool decrease, enum qcow2_discard_type type);
|
||||
|
||||
static uint64_t get_refcount_ro0(const void *refcount_array, uint64_t index);
|
||||
static uint64_t get_refcount_ro1(const void *refcount_array, uint64_t index);
|
||||
@@ -803,12 +805,12 @@ found:
|
||||
/* XXX: cache several refcount block clusters ? */
|
||||
/* @addend is the absolute value of the addend; if @decrease is set, @addend
|
||||
* will be subtracted from the current refcount, otherwise it will be added */
|
||||
static int QEMU_WARN_UNUSED_RESULT update_refcount(BlockDriverState *bs,
|
||||
int64_t offset,
|
||||
int64_t length,
|
||||
uint64_t addend,
|
||||
bool decrease,
|
||||
enum qcow2_discard_type type)
|
||||
static int update_refcount(BlockDriverState *bs,
|
||||
int64_t offset,
|
||||
int64_t length,
|
||||
uint64_t addend,
|
||||
bool decrease,
|
||||
enum qcow2_discard_type type)
|
||||
{
|
||||
BDRVQcow2State *s = bs->opaque;
|
||||
int64_t start, last, cluster_offset;
|
||||
|
||||
+1
-1
@@ -838,7 +838,7 @@ int qcow2_update_header(BlockDriverState *bs);
|
||||
|
||||
void qcow2_signal_corruption(BlockDriverState *bs, bool fatal, int64_t offset,
|
||||
int64_t size, const char *message_format, ...)
|
||||
GCC_FMT_ATTR(5, 6);
|
||||
G_GNUC_PRINTF(5, 6);
|
||||
|
||||
int qcow2_validate_table(BlockDriverState *bs, uint64_t offset,
|
||||
uint64_t entries, size_t entry_len,
|
||||
|
||||
+2
-2
@@ -108,7 +108,7 @@ static void ssh_state_free(BDRVSSHState *s)
|
||||
}
|
||||
}
|
||||
|
||||
static void GCC_FMT_ATTR(3, 4)
|
||||
static void G_GNUC_PRINTF(3, 4)
|
||||
session_error_setg(Error **errp, BDRVSSHState *s, const char *fs, ...)
|
||||
{
|
||||
va_list args;
|
||||
@@ -133,7 +133,7 @@ session_error_setg(Error **errp, BDRVSSHState *s, const char *fs, ...)
|
||||
g_free(msg);
|
||||
}
|
||||
|
||||
static void GCC_FMT_ATTR(3, 4)
|
||||
static void G_GNUC_PRINTF(3, 4)
|
||||
sftp_error_setg(Error **errp, BDRVSSHState *s, const char *fs, ...)
|
||||
{
|
||||
va_list args;
|
||||
|
||||
+1
-1
@@ -175,7 +175,7 @@ abi_long do_netbsd_syscall(void *cpu_env, int num, abi_long arg1,
|
||||
abi_long do_openbsd_syscall(void *cpu_env, int num, abi_long arg1,
|
||||
abi_long arg2, abi_long arg3, abi_long arg4,
|
||||
abi_long arg5, abi_long arg6);
|
||||
void gemu_log(const char *fmt, ...) GCC_FMT_ATTR(1, 2);
|
||||
void gemu_log(const char *fmt, ...) G_GNUC_PRINTF(1, 2);
|
||||
extern __thread CPUState *thread_cpu;
|
||||
void cpu_loop(CPUArchState *env);
|
||||
char *target_strerror(int err);
|
||||
|
||||
@@ -2248,7 +2248,7 @@ static void foo_free(Foo *f)
|
||||
{
|
||||
g_free(f);
|
||||
}
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC(Foo, foo_free);
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC(Foo, foo_free)
|
||||
int main(void) { return 0; }
|
||||
EOF
|
||||
if ! compile_prog "$glib_cflags -Werror" "$glib_libs" ; then
|
||||
@@ -2481,41 +2481,6 @@ if compile_prog "" "" ; then
|
||||
int128=yes
|
||||
fi
|
||||
|
||||
#########################################
|
||||
# See if 128-bit atomic operations are supported.
|
||||
|
||||
atomic128=no
|
||||
if test "$int128" = "yes"; then
|
||||
cat > $TMPC << EOF
|
||||
int main(void)
|
||||
{
|
||||
unsigned __int128 x = 0, y = 0;
|
||||
y = __atomic_load(&x, 0);
|
||||
__atomic_store(&x, y, 0);
|
||||
__atomic_compare_exchange(&x, &y, x, 0, 0, 0);
|
||||
return 0;
|
||||
}
|
||||
EOF
|
||||
if compile_prog "" "" ; then
|
||||
atomic128=yes
|
||||
fi
|
||||
fi
|
||||
|
||||
cmpxchg128=no
|
||||
if test "$int128" = yes && test "$atomic128" = no; then
|
||||
cat > $TMPC << EOF
|
||||
int main(void)
|
||||
{
|
||||
unsigned __int128 x = 0, y = 0;
|
||||
__sync_val_compare_and_swap_16(&x, y, x);
|
||||
return 0;
|
||||
}
|
||||
EOF
|
||||
if compile_prog "" "" ; then
|
||||
cmpxchg128=yes
|
||||
fi
|
||||
fi
|
||||
|
||||
########################################
|
||||
# check if ccache is interfering with
|
||||
# semantic analysis of macros
|
||||
@@ -2959,18 +2924,6 @@ if test "$have_tsan" = "yes" && test "$have_tsan_iface_fiber" = "yes" ; then
|
||||
echo "CONFIG_TSAN=y" >> $config_host_mak
|
||||
fi
|
||||
|
||||
if test "$int128" = "yes" ; then
|
||||
echo "CONFIG_INT128=y" >> $config_host_mak
|
||||
fi
|
||||
|
||||
if test "$atomic128" = "yes" ; then
|
||||
echo "CONFIG_ATOMIC128=y" >> $config_host_mak
|
||||
fi
|
||||
|
||||
if test "$cmpxchg128" = "yes" ; then
|
||||
echo "CONFIG_CMPXCHG128=y" >> $config_host_mak
|
||||
fi
|
||||
|
||||
if test "$rdma" = "yes" ; then
|
||||
echo "CONFIG_RDMA=y" >> $config_host_mak
|
||||
echo "RDMA_LIBS=$rdma_libs" >> $config_host_mak
|
||||
|
||||
@@ -84,8 +84,8 @@ qcrypto_afalg_cipher_ctx_new(QCryptoCipherAlgorithm alg,
|
||||
g_free(name);
|
||||
|
||||
/* setkey */
|
||||
if (qemu_setsockopt(afalg->tfmfd, SOL_ALG, ALG_SET_KEY, key,
|
||||
nkey) != 0) {
|
||||
if (setsockopt(afalg->tfmfd, SOL_ALG, ALG_SET_KEY, key,
|
||||
nkey) != 0) {
|
||||
error_setg_errno(errp, errno, "Set key failed");
|
||||
qcrypto_afalg_comm_free(afalg);
|
||||
return NULL;
|
||||
|
||||
+2
-2
@@ -88,8 +88,8 @@ qcrypto_afalg_hash_hmac_ctx_new(QCryptoHashAlgorithm alg,
|
||||
|
||||
/* HMAC needs setkey */
|
||||
if (is_hmac) {
|
||||
if (qemu_setsockopt(afalg->tfmfd, SOL_ALG, ALG_SET_KEY,
|
||||
key, nkey) != 0) {
|
||||
if (setsockopt(afalg->tfmfd, SOL_ALG, ALG_SET_KEY,
|
||||
key, nkey) != 0) {
|
||||
error_setg_errno(errp, errno, "Set hmac key failed");
|
||||
qcrypto_afalg_comm_free(afalg);
|
||||
return NULL;
|
||||
|
||||
+1
-1
@@ -27,7 +27,7 @@ void v9fs_string_free(V9fsString *str)
|
||||
str->size = 0;
|
||||
}
|
||||
|
||||
void GCC_FMT_ATTR(2, 3)
|
||||
void G_GNUC_PRINTF(2, 3)
|
||||
v9fs_string_sprintf(V9fsString *str, const char *fmt, ...)
|
||||
{
|
||||
va_list ap;
|
||||
|
||||
@@ -57,7 +57,7 @@ static bool is_daemon;
|
||||
static bool get_version; /* IOC getversion IOCTL supported */
|
||||
static char *prog_name;
|
||||
|
||||
static void GCC_FMT_ATTR(2, 3) do_log(int loglevel, const char *format, ...)
|
||||
static void G_GNUC_PRINTF(2, 3) do_log(int loglevel, const char *format, ...)
|
||||
{
|
||||
va_list ap;
|
||||
|
||||
|
||||
@@ -426,7 +426,7 @@ static int get_char(void)
|
||||
int ret;
|
||||
|
||||
for(;;) {
|
||||
ret = qemu_recv(gdbserver_state.fd, &ch, 1, 0);
|
||||
ret = recv(gdbserver_state.fd, &ch, 1, 0);
|
||||
if (ret < 0) {
|
||||
if (errno == ECONNRESET)
|
||||
gdbserver_state.fd = -1;
|
||||
|
||||
+1
-1
@@ -203,7 +203,7 @@ void v9fs_path_free(V9fsPath *path)
|
||||
}
|
||||
|
||||
|
||||
void GCC_FMT_ATTR(2, 3)
|
||||
void G_GNUC_PRINTF(2, 3)
|
||||
v9fs_path_sprintf(V9fsPath *path, const char *fmt, ...)
|
||||
{
|
||||
va_list ap;
|
||||
|
||||
+2
-2
@@ -207,7 +207,7 @@ build_append_nameseg(GArray *array, const char *seg)
|
||||
g_array_append_vals(array, "____", ACPI_NAMESEG_LEN - len);
|
||||
}
|
||||
|
||||
static void GCC_FMT_ATTR(2, 0)
|
||||
static void G_GNUC_PRINTF(2, 0)
|
||||
build_append_namestringv(GArray *array, const char *format, va_list ap)
|
||||
{
|
||||
char *s;
|
||||
@@ -270,7 +270,7 @@ build_append_namestringv(GArray *array, const char *format, va_list ap)
|
||||
g_strfreev(segs);
|
||||
}
|
||||
|
||||
GCC_FMT_ATTR(2, 3)
|
||||
G_GNUC_PRINTF(2, 3)
|
||||
static void build_append_namestring(GArray *array, const char *format, ...)
|
||||
{
|
||||
va_list ap;
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user