Notification time stamped 2022-02-22 10:30:16 UTC
From 27de668705af999d6fa2ec3f57f9e3beba75aa8c Mon Sep 17 00:00:00 2001
From: Lukáš Hrázký <lhrazky(a)redhat.com>
Date: Feb 21 2022 15:49:37 +0000
Subject: Backport from upstream: 21732fc - Resolve g++ warning: free-nonheap-object
---
diff --git a/0001-Resolve-g-warning-free-nonheap-object.patch
b/0001-Resolve-g-warning-free-nonheap-object.patch
new file mode 100644
index 0000000..8321cdc
--- /dev/null
+++ b/0001-Resolve-g-warning-free-nonheap-object.patch
@@ -0,0 +1,28 @@
+From 21732fce459911d4da0214baff52af7c8c48cc9f Mon Sep 17 00:00:00 2001
+From: "Louis R. Marascio" <marascio(a)gmail.com>
+Date: Wed, 1 Dec 2021 14:43:43 -0600
+Subject: [PATCH] Resolve g++ warning: free-nonheap-object
+
+As described in issue #173, this warning is raised on various platforms
+and in various build types. For example, g++ 11 in release mode will
+cause this warning to be raised. This change fixes this warning.
+---
+ toml/parser.hpp | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/toml/parser.hpp b/toml/parser.hpp
+index 62be405..7636f14 100644
+--- a/toml/parser.hpp
++++ b/toml/parser.hpp
+@@ -2134,7 +2134,7 @@ result<Value, std::string> parse_toml_file(location&
loc)
+
+ table_type data;
+ // root object is also a table, but without [tablename]
+- if(auto tab = parse_ml_table<value_type>(loc))
++ if(const auto tab = parse_ml_table<value_type>(loc))
+ {
+ data = std::move(tab.unwrap());
+ }
+--
+2.31.1
+
diff --git a/toml11.spec b/toml11.spec
index b8f1fe0..dd7b7d0 100644
--- a/toml11.spec
+++ b/toml11.spec
@@ -6,12 +6,13 @@
Name: toml11
Version: 3.6.1
-Release: 4%{?dist}
+Release: 5%{?dist}
Summary: TOML for Modern C++
License: MIT
URL:
https://github.com/ToruNiina/toml11
Source0: %{url}/archive/v%{version}/%{name}-%{version}.tar.gz
+Patch1: 0001-Resolve-g-warning-free-nonheap-object.patch
BuildRequires: cmake
BuildRequires: gcc-c++
@@ -79,6 +80,9 @@ Development files for %{name}.
%changelog
+* Mon Feb 21 2022 Lukáš Hrázký <lhrazky(a)redhat.com> - 3.6.1-5
+- Backport from upstream: 21732fc - Resolve g++ warning: free-nonheap-object
+
* Sat Jan 22 2022 Fedora Release Engineering <releng(a)fedoraproject.org> - 3.6.1-4
- Rebuilt for
https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
https://src.fedoraproject.org/rpms/toml11/c/27de668705af999d6fa2ec3f57f9e...