Fix-compiler-warning-Wredundant-parens.patch

This commit is contained in:
yefeng 2021-11-10 15:14:56 +08:00
parent 28498ab2cb
commit 52e9e64254
2 changed files with 28 additions and 1 deletions

View File

@ -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<typename T, typename S>
Offset<Vector<const T *>> 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<T> vv(len);
std::transform(v, v + len, vv.begin(), pack_func);
@@ -1912,7 +1912,7 @@ class FlatBufferBuilder {
/// where the vector is stored.
template<typename T, typename S>
Offset<Vector<const T *>> CreateVectorOfNativeStructs(
- const std::vector<S> &v, T((*const pack_func)(const S &))) {
+ const std::vector<S> &v, T (*const pack_func)(const S &)) {
return CreateVectorOfNativeStructs<T, S>(data(v), v.size(), pack_func);
}

View File

@ -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 <liyanan32@huawei.com> - 1.10.0-1
- Package init
* Wed Nov 11 2021 yefeng <yefeng24@huawei.com> - 2.0.0-2
- Package init