Rebase to 11.0 release
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
This commit is contained in:
parent
8e4cdf5923
commit
e90193e796
@ -1,72 +0,0 @@
|
||||
From 2e6adf9b85cee3b85a9f7da8d976f3dd022afaa3 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= <berrange@redhat.com>
|
||||
Date: Tue, 27 Jul 2021 16:25:12 +0100
|
||||
Subject: [PATCH] src: avoid warnings from use of G_GNUC_FALLTHROUGH
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Since glib >= 2.69 we get warnings:
|
||||
|
||||
../src/ovirt-foreign-menu.c: In function 'ovirt_foreign_menu_next_async_step':
|
||||
../src/ovirt-foreign-menu.c:319:13: error: Not available before 2.60 [-Werror]
|
||||
319 | G_GNUC_FALLTHROUGH;
|
||||
| ^~~~~~~~~~~~~~~
|
||||
../src/ovirt-foreign-menu.c:345:13: error: Not available before 2.60 [-Werror]
|
||||
345 | G_GNUC_FALLTHROUGH;
|
||||
| ^~~~~~~~~~~~~~~
|
||||
../src/ovirt-foreign-menu.c:351:13: error: Not available before 2.60 [-Werror]
|
||||
351 | G_GNUC_FALLTHROUGH;
|
||||
| ^~~~~~~~~~~~~~~
|
||||
../src/ovirt-foreign-menu.c:357:13: error: Not available before 2.60 [-Werror]
|
||||
357 | G_GNUC_FALLTHROUGH;
|
||||
| ^~~~~~~~~~~~~~~
|
||||
cc1: all warnings being treated as errors
|
||||
|
||||
GLib is right to warn about this, since it does not know that we
|
||||
provided our own back-compat definition of the macro. For now we have to
|
||||
temporarily purge glib's macro entirely in order to get rid of the
|
||||
warning that is bogus for our usage.
|
||||
|
||||
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
|
||||
---
|
||||
src/ovirt-foreign-menu.c | 23 +++++++++++++++++------
|
||||
1 file changed, 17 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/src/ovirt-foreign-menu.c b/src/ovirt-foreign-menu.c
|
||||
index c19e913..91b6824 100644
|
||||
--- a/src/ovirt-foreign-menu.c
|
||||
+++ b/src/ovirt-foreign-menu.c
|
||||
@@ -31,12 +31,23 @@
|
||||
#include "virt-viewer-util.h"
|
||||
#include "glib-compat.h"
|
||||
|
||||
-#if !GLIB_CHECK_VERSION(2, 60, 0)
|
||||
-# if __GNUC_PREREQ (7, 0)
|
||||
-# define G_GNUC_FALLTHROUGH __attribute__((fallthrough))
|
||||
-# else
|
||||
-# define G_GNUC_FALLTHROUGH do {} while(0)
|
||||
-# endif
|
||||
+/* GLib 2.69 annotated macros with version tags, and
|
||||
+ * since we set GLIB_VERSION_MAX_ALLOWED to 2.48
|
||||
+ * it complains if we use G_GNUC_FALLTHROUGH at
|
||||
+ * all. We temporarily purge the GLib definition
|
||||
+ * of G_GNUC_FALLTHROUGH and define it ourselves.
|
||||
+ * When we set min glib >= 2.60, we can delete
|
||||
+ * all this
|
||||
+ */
|
||||
+#ifndef __GNUC_PREREQ
|
||||
+# define __GNUC_PREREQ(maj, min) \
|
||||
+ ((__GNUC__ << 16) + __GNUC_MINOR__ >= ((maj) << 16) + (min))
|
||||
+#endif
|
||||
+#undef G_GNUC_FALLTHROUGH
|
||||
+#if __GNUC_PREREQ (7, 0)
|
||||
+# define G_GNUC_FALLTHROUGH __attribute__((fallthrough))
|
||||
+#else
|
||||
+# define G_GNUC_FALLTHROUGH do {} while(0)
|
||||
#endif
|
||||
|
||||
typedef enum {
|
||||
--
|
||||
2.31.1
|
||||
|
@ -1,47 +0,0 @@
|
||||
From 9e36a59c806de3de77c046df0b8c80bd9a0f4863 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?J=C3=A1n=20Tomko?= <jtomko@redhat.com>
|
||||
Date: Fri, 23 Apr 2021 15:58:56 +0200
|
||||
Subject: [PATCH] src: initialize keymaps variable
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
My clang version 11.0.0 (Fedora 11.0.0-2.fc33) complains:
|
||||
../src/virt-viewer-app.c:610:9: error: variable 'keymaps' is used uninitialized whenever 'if' condition is false [-Werror,-Wsometimes-uninitialized]
|
||||
if (keymap_string) {
|
||||
^~~~~~~~~~~~~
|
||||
../src/virt-viewer-app.c:614:10: note: uninitialized use occurs here
|
||||
if (!keymaps || g_strv_length(keymaps) == 0) {
|
||||
^~~~~~~
|
||||
../src/virt-viewer-app.c:610:5: note: remove the 'if' if its condition is always true
|
||||
if (keymap_string) {
|
||||
^~~~~~~~~~~~~~~~~~~
|
||||
../src/virt-viewer-app.c:595:27: note: initialize the variable 'keymaps' to silence this warning
|
||||
gchar **key, **keymaps, **valkey, **valuekeys = NULL;
|
||||
^
|
||||
= NULL
|
||||
1 error generated.
|
||||
|
||||
Initialize the variable to fix the uninitialized use.
|
||||
|
||||
Signed-off-by: Ján Tomko <jtomko@redhat.com>
|
||||
---
|
||||
src/virt-viewer-app.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/virt-viewer-app.c b/src/virt-viewer-app.c
|
||||
index 0095398..de2677c 100644
|
||||
--- a/src/virt-viewer-app.c
|
||||
+++ b/src/virt-viewer-app.c
|
||||
@@ -592,7 +592,7 @@ static
|
||||
void virt_viewer_app_set_keymap(VirtViewerApp *self, const gchar *keymap_string)
|
||||
{
|
||||
VirtViewerAppPrivate *priv = virt_viewer_app_get_instance_private(self);
|
||||
- gchar **key, **keymaps, **valkey, **valuekeys = NULL;
|
||||
+ gchar **key, **keymaps = NULL, **valkey, **valuekeys = NULL;
|
||||
VirtViewerKeyMapping *keyMappingArray, *keyMappingPtr;
|
||||
guint *mappedArray, *ptrMove;
|
||||
|
||||
--
|
||||
2.31.1
|
||||
|
2
sources
2
sources
@ -1 +1 @@
|
||||
SHA512 (virt-viewer-10.0.tar.xz) = 82ed552337c3d71d762aed14e6fb20a123448fd5cf8c51f8f942ddd226ee2a4fa3ab8b9b893bbdde16628fb03363f2455e1d895074237d40ff567d642d216fd3
|
||||
SHA512 (virt-viewer-11.0.tar.xz) = 738034e15e40a7aaadd2646bf289c12409cbf2d06925d43baa50fa7bc8438188480d6b97687e9816427ac0a9dae84d205351715cb2f38afdbefa2dd1d134904a
|
||||
|
@ -9,14 +9,12 @@
|
||||
%endif
|
||||
|
||||
Name: virt-viewer
|
||||
Version: 10.0
|
||||
Release: 6%{?dist}
|
||||
Version: 11.0
|
||||
Release: 1%{?dist}
|
||||
Summary: Virtual Machine Viewer
|
||||
License: GPLv2+
|
||||
URL: https://gitlab.com/virt-viewer/virt-viewer
|
||||
Source0: https://virt-manager.org/download/sources/%{name}/%{name}-%{version}.tar.xz
|
||||
Patch1: 0001-src-avoid-warnings-from-use-of-G_GNUC_FALLTHROUGH.patch
|
||||
Patch2: 0001-src-initialize-keymaps-variable.patch
|
||||
Requires: openssh-clients
|
||||
|
||||
# Our bash completion script uses virsh to list domains
|
||||
@ -77,7 +75,7 @@ the display, and libvirt for looking up VNC/SPICE server details.
|
||||
%find_lang %{name}
|
||||
|
||||
%files -f %{name}.lang
|
||||
%doc README.md COPYING AUTHORS ChangeLog NEWS
|
||||
%doc README.md COPYING AUTHORS NEWS
|
||||
%{_bindir}/%{name}
|
||||
%{_bindir}/remote-viewer
|
||||
%{_datadir}/icons/hicolor/*/apps/*
|
||||
@ -89,6 +87,10 @@ the display, and libvirt for looking up VNC/SPICE server details.
|
||||
%{_datadir}/bash-completion/completions/virt-viewer
|
||||
|
||||
%changelog
|
||||
* Tue Nov 30 2021 Daniel P. Berrangé <berrange@redhat.com> - 11.0-1
|
||||
- Rebase to 11.0 release
|
||||
- Fixes often disabled send-key menu (rhbz#2020872)
|
||||
|
||||
* Thu Nov 25 2021 Daniel P. Berrangé <berrange@redhat.com> - 10.0-6
|
||||
- Add missing dep on libvirt-clients for bash completion
|
||||
- Refactor setting build-id opt
|
||||
|
Loading…
Reference in New Issue
Block a user