Fix build with GCC 13
This commit is contained in:
parent
7a20dc1ed2
commit
cd0e2119de
48
0001-Fix-build-with-GCC13.patch
Normal file
48
0001-Fix-build-with-GCC13.patch
Normal file
@ -0,0 +1,48 @@
|
||||
From c68f5f9cade8a890efefcb4c2e0fc57762211286 Mon Sep 17 00:00:00 2001
|
||||
From: Elliott Sales de Andrade <quantum.analyst@gmail.com>
|
||||
Date: Fri, 24 Feb 2023 14:01:18 -0500
|
||||
Subject: [PATCH] Fix build with GCC13
|
||||
|
||||
GCC 13 now complains about this line:
|
||||
```
|
||||
src/ui/widget/selected-style.cpp:111:6: error: statement-expressions are not allowed outside functions nor in template-argument lists
|
||||
111 | {g_strdup("application/x-oswb-color"), 0, APP_OSWB_COLOR}
|
||||
| ^~~~~~~~
|
||||
```
|
||||
|
||||
However, it is not necessary to strdup the string constant as the value
|
||||
just needs to exist indefinitely, and it will as a constant. While C
|
||||
doesn't mind the `const` difference, a simple cast will silence C++'s
|
||||
higher strictness.
|
||||
|
||||
And in fact, the other use of `GtkTargetEntry` in
|
||||
`src/ui/drag-and-drop.cpp` does the same cast.
|
||||
|
||||
Signed-off-by: Elliott Sales de Andrade <quantum.analyst@gmail.com>
|
||||
---
|
||||
src/ui/widget/selected-style.cpp | 8 +-------
|
||||
1 file changed, 1 insertion(+), 7 deletions(-)
|
||||
|
||||
diff --git a/src/ui/widget/selected-style.cpp b/src/ui/widget/selected-style.cpp
|
||||
index 68fe1fc426..7274f1b74c 100644
|
||||
--- a/src/ui/widget/selected-style.cpp
|
||||
+++ b/src/ui/widget/selected-style.cpp
|
||||
@@ -100,14 +100,8 @@ enum ui_drop_target_info {
|
||||
APP_OSWB_COLOR
|
||||
};
|
||||
|
||||
-//TODO: warning: deprecated conversion from string constant to ‘gchar*’
|
||||
-//
|
||||
-//Turn out to be warnings that we should probably leave in place. The
|
||||
-// pointers/types used need to be read-only. So until we correct the using
|
||||
-// code, those warnings are actually desired. They say "Hey! Fix this". We
|
||||
-// definitely don't want to hide/ignore them. --JonCruz
|
||||
static const GtkTargetEntry ui_drop_target_entries [] = {
|
||||
- {g_strdup("application/x-oswb-color"), 0, APP_OSWB_COLOR}
|
||||
+ {(gchar *)"application/x-oswb-color", 0, APP_OSWB_COLOR}
|
||||
};
|
||||
|
||||
static guint nui_drop_target_entries = G_N_ELEMENTS(ui_drop_target_entries);
|
||||
--
|
||||
2.39.2
|
||||
|
@ -10,7 +10,7 @@
|
||||
|
||||
Name: inkscape
|
||||
Version: 1.2.2
|
||||
Release: 6%{?dist}
|
||||
Release: 7%{?dist}
|
||||
Summary: Vector-based drawing program using SVG
|
||||
|
||||
# Inkscape tags their releases with underscores and in ALLCAPS
|
||||
@ -19,6 +19,8 @@ Summary: Vector-based drawing program using SVG
|
||||
License: GPLv2+ and CC-BY
|
||||
URL: https://inkscape.org/
|
||||
Source0: https://inkscape.org/gallery/item/37360/inkscape-1.2.2.tar.xz
|
||||
# https://gitlab.com/inkscape/inkscape/-/merge_requests/5108
|
||||
Patch: 0001-Fix-build-with-GCC13.patch
|
||||
|
||||
# Fedora Color Palette, GIMP format, CC-BY 3.0
|
||||
Source2: Fedora-Color-Palette.gpl
|
||||
@ -226,6 +228,9 @@ desktop-file-validate $RPM_BUILD_ROOT%{_datadir}/applications/org.inkscape.Inksc
|
||||
|
||||
|
||||
%changelog
|
||||
* Fri Feb 24 2023 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 1.2.2-7
|
||||
- Fix build with GCC 13
|
||||
|
||||
* Mon Feb 20 2023 Jonathan Wakely <jwakely@redhat.com> - 1.2.2-6
|
||||
- Rebuilt for Boost 1.81
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user