From 52e9e64254f1c07a40fff4c45c46a379dc7d6678 Mon Sep 17 00:00:00 2001 From: yefeng Date: Wed, 10 Nov 2021 15:14:56 +0800 Subject: [PATCH] Fix-compiler-warning-Wredundant-parens.patch --- ...x-compiler-warning-Wredundant-parens.patch | 22 +++++++++++++++++++ flatbuffers.spec | 7 +++++- 2 files changed, 28 insertions(+), 1 deletion(-) create mode 100644 0001-Fix-compiler-warning-Wredundant-parens.patch diff --git a/0001-Fix-compiler-warning-Wredundant-parens.patch b/0001-Fix-compiler-warning-Wredundant-parens.patch new file mode 100644 index 0000000..a7d31b6 --- /dev/null +++ b/0001-Fix-compiler-warning-Wredundant-parens.patch @@ -0,0 +1,22 @@ +diff --git a/include/flatbuffers/flatbuffers.h b/include/flatbuffers/flatbuffers.h +index ee34d54..aecf80f 100644 +--- a/include/flatbuffers/flatbuffers.h ++++ b/include/flatbuffers/flatbuffers.h +@@ -1824,7 +1824,7 @@ class FlatBufferBuilder { + /// where the vector is stored. + template + Offset> CreateVectorOfNativeStructs( +- const S *v, size_t len, T((*const pack_func)(const S &))) { ++ const S *v, size_t len, T (*const pack_func)(const S &)) { + FLATBUFFERS_ASSERT(pack_func); + std::vector vv(len); + std::transform(v, v + len, vv.begin(), pack_func); +@@ -1912,7 +1912,7 @@ class FlatBufferBuilder { + /// where the vector is stored. + template + Offset> CreateVectorOfNativeStructs( +- const std::vector &v, T((*const pack_func)(const S &))) { ++ const std::vector &v, T (*const pack_func)(const S &)) { + return CreateVectorOfNativeStructs(data(v), v.size(), pack_func); + } + diff --git a/flatbuffers.spec b/flatbuffers.spec index 6f70b84..49ae4b7 100644 --- a/flatbuffers.spec +++ b/flatbuffers.spec @@ -5,7 +5,7 @@ %endif Name: flatbuffers Version: 2.0.0 -Release: 1 +Release: 2 Summary: Memory efficient serialization library License: Apache-2.0 URL: https://github.com/google/flatbuffers @@ -13,6 +13,8 @@ Source0: https://github.com/google/flatbuffers/archive/refs/tags/v%{ Source1: flatc.1 Source2: flatbuffers.7 +Patch0: 0001-Fix-compiler-warning-Wredundant-parens.patch + BuildRequires: gcc-c++ cmake >= 2.8.9 Provides: bundled(grpc) %description @@ -78,3 +80,6 @@ make test * Mon Jan 11 2021 yanan li - 1.10.0-1 - Package init + +* Wed Nov 11 2021 yefeng - 2.0.0-2 +- Package init \ No newline at end of file -- Gitee