[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v3 08/13] Remove glib compatibility code that is not required any
From: |
Thomas Huth |
Subject: |
[PATCH v3 08/13] Remove glib compatibility code that is not required anymore |
Date: |
Thu, 18 Apr 2024 12:10:51 +0200 |
Now that we bumped the minumum glib version to 2.66, we can drop
the old code.
Suggested-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
qga/commands-posix-ssh.c | 8 --------
util/error-report.c | 10 ----------
2 files changed, 18 deletions(-)
diff --git a/qga/commands-posix-ssh.c b/qga/commands-posix-ssh.c
index b0e0b1d674..cc1f5a708e 100644
--- a/qga/commands-posix-ssh.c
+++ b/qga/commands-posix-ssh.c
@@ -288,7 +288,6 @@ qmp_guest_ssh_get_authorized_keys(const char *username,
Error **errp)
}
#ifdef QGA_BUILD_UNIT_TEST
-#if GLIB_CHECK_VERSION(2, 60, 0)
static const strList test_key2 = {
.value = (char *)"algo key2 comments"
};
@@ -484,11 +483,4 @@ int main(int argc, char *argv[])
return g_test_run();
}
-#else
-int main(int argc, char *argv[])
-{
- g_test_message("test skipped, needs glib >= 2.60");
- return 0;
-}
-#endif /* GLIB_2_60 */
#endif /* BUILD_UNIT_TEST */
diff --git a/util/error-report.c b/util/error-report.c
index 6e44a55732..1b17c11de1 100644
--- a/util/error-report.c
+++ b/util/error-report.c
@@ -172,18 +172,8 @@ static void print_loc(void)
static char *
real_time_iso8601(void)
{
-#if GLIB_CHECK_VERSION(2,62,0)
g_autoptr(GDateTime) dt = g_date_time_new_now_utc();
- /* ignore deprecation warning, since GLIB_VERSION_MAX_ALLOWED is 2.56 */
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
return g_date_time_format_iso8601(dt);
-#pragma GCC diagnostic pop
-#else
- GTimeVal tv;
- g_get_current_time(&tv);
- return g_time_val_to_iso8601(&tv);
-#endif
}
/*
--
2.44.0
- [PATCH v3 00/13] Drop old distros, bump glib and switch to glib URI parsing code, Thomas Huth, 2024/04/18
- [PATCH v3 01/13] tests: Remove Ubuntu 20.04 container, Thomas Huth, 2024/04/18
- [PATCH v3 02/13] tests/lcitool/libvirt-ci: Update to the latest master branch, Thomas Huth, 2024/04/18
- [PATCH v3 03/13] tests/docker/dockerfiles: Run lcitool-refresh after the lcitool update, Thomas Huth, 2024/04/18
- [PATCH v3 04/13] tests: Update our CI to use CentOS Stream 9 instead of 8, Thomas Huth, 2024/04/18
- [PATCH v3 05/13] .travis.yml: Update the jobs to Ubuntu 22.04, Thomas Huth, 2024/04/18
- [PATCH v3 06/13] ci: move external build environment setups to CentOS Stream 9, Thomas Huth, 2024/04/18
- [PATCH v3 08/13] Remove glib compatibility code that is not required anymore,
Thomas Huth <=
- [PATCH v3 07/13] Bump minimum glib version to v2.66, Thomas Huth, 2024/04/18
- [PATCH v3 09/13] block/gluster: Use URI parsing code from glib, Thomas Huth, 2024/04/18
- [PATCH v3 10/13] block/nbd: Use URI parsing code from glib, Thomas Huth, 2024/04/18
- [PATCH v3 11/13] block/nfs: Use URI parsing code from glib, Thomas Huth, 2024/04/18
- [PATCH v3 12/13] block/ssh: Use URI parsing code from glib, Thomas Huth, 2024/04/18
- [PATCH v3 13/13] util/uri: Remove the old URI parsing code, Thomas Huth, 2024/04/18