aboutsummaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-graphics/libyui/libyui/0001-Fix-GCC-8-warning.patch
blob: c1ba42eeedf5b21b2182436b267d898eacf0d6f9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
From 1e6d40fec16a94d1a4bd40634405267200b7e969 Mon Sep 17 00:00:00 2001
From: marxin <mliska@suse.cz>
Date: Tue, 10 Apr 2018 15:21:40 +0200
Subject: [PATCH] Fix GCC 8 warning:
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

/home/marxin/Programming/libyui/src/YDialog.cc: In static member function ‘static void YDialog::showText(const string&, bool)’:
/home/marxin/Programming/libyui/src/YDialog.cc:690:26: error: catching polymorphic type ‘class YUIException’ by value [-Werror=catch-value=]
     catch ( YUIException exception )
                          ^~~~~~~~~
/home/marxin/Programming/libyui/src/YDialog.cc: In static member function ‘static bool YDialog::showRelNotesText()’:
/home/marxin/Programming/libyui/src/YDialog.cc:814:26: error: catching polymorphic type ‘class YUIException’ by value [-Werror=catch-value=]
     catch ( YUIException exception )
                          ^~~~~~~~~
---
Upstream-Status: Submitted [https://github.com/libyui/libyui/pull/122]
Signed-off-by: Khem Raj <raj.khem@gmail.com>

 src/YDialog.cc | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/YDialog.cc b/src/YDialog.cc
index 92e5031..8ecff90 100644
--- a/src/YDialog.cc
+++ b/src/YDialog.cc
@@ -687,7 +687,7 @@ YDialog::showText( const std::string & text, bool useRichText )
 	dialog->waitForEvent();
 	dialog->destroy();
     }
-    catch ( YUIException exception )
+    catch ( YUIException &exception )
     {
 	// Don't let the application die just because help couldn't be displayed.
 
@@ -811,7 +811,7 @@ YDialog::showRelNotesText()
 	}
         dialog->destroy();
     }
-    catch ( YUIException exception )
+    catch ( YUIException &exception )
     {
         // Don't let the application die just because RN couldn't be displayed.
 
-- 
2.17.0