mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-07-16 04:35:13 +03:00
94 lines
3.4 KiB
Diff
94 lines
3.4 KiB
Diff
From be9ae3a1943e7164ac093fe46612b94fa9fbd69f Mon Sep 17 00:00:00 2001
|
|
From: Marcin Konarski <marcin.konarski@lizardfs.com>
|
|
Date: Thu, 27 May 2021 14:27:17 +0200
|
|
Subject: [PATCH] all: Fix (release) build warnings from GCC 11.1.1
|
|
|
|
Change-Id: I164403e5fd866828b2970a23e928a495630405a7
|
|
---
|
|
src/common/small_vector_unittest.cc | 3 +++
|
|
src/master/matoclserv.cc | 2 +-
|
|
src/tools/file_info.cc | 3 +++
|
|
src/uraft/main.cc | 1 +
|
|
src/uraft/uraft.cc | 1 +
|
|
src/uraft/uraftcontroller.cc | 1 +
|
|
6 files changed, 10 insertions(+), 1 deletion(-)
|
|
|
|
diff --git a/src/common/small_vector_unittest.cc b/src/common/small_vector_unittest.cc
|
|
index 488a940e6..2da7d6640 100644
|
|
--- a/src/common/small_vector_unittest.cc
|
|
+++ b/src/common/small_vector_unittest.cc
|
|
@@ -83,7 +83,10 @@ TEST(SmallVectorTest, EraseTest) {
|
|
small_vector<int16_t, 7> vec_A;
|
|
std::vector<int16_t> vec_B;
|
|
|
|
+#pragma GCC diagnostic push
|
|
+#pragma GCC diagnostic ignored "-Wstringop-overflow"
|
|
vec_A.insert(vec_A.begin(), range.begin(), range.end());
|
|
+#pragma GCC diagnostic pop
|
|
vec_B.insert(vec_B.begin(), range.begin(), range.end());
|
|
|
|
vec_A.erase(vec_A.begin() + 40);
|
|
diff --git a/src/master/matoclserv.cc b/src/master/matoclserv.cc
|
|
index 324633076..1645fc244 100644
|
|
--- a/src/master/matoclserv.cc
|
|
+++ b/src/master/matoclserv.cc
|
|
@@ -2891,7 +2891,7 @@ void matoclserv_fuse_read_chunk(matoclserventry *eptr, PacketHeader header, cons
|
|
}
|
|
|
|
void matoclserv_chunks_info(matoclserventry *eptr, const uint8_t *data, uint32_t length) {
|
|
- uint32_t message_id, inode, chunk_index, chunk_count, uid, gid;
|
|
+ uint32_t message_id{0}, inode, chunk_index, chunk_count, uid, gid;
|
|
PacketVersion version;
|
|
uint8_t status;
|
|
std::vector<ChunkWithAddressAndLabel> chunks;
|
|
diff --git a/src/tools/file_info.cc b/src/tools/file_info.cc
|
|
index fa03f591e..50a381229 100644
|
|
--- a/src/tools/file_info.cc
|
|
+++ b/src/tools/file_info.cc
|
|
@@ -120,7 +120,10 @@ static int chunks_info(const char *file_name, int fd, uint32_t inode, bool long_
|
|
chunk_index, chunk.chunk_id, chunk.chunk_version, chunk.chunk_id, chunk.chunk_version);
|
|
ChunkCopiesCalculator chunk_calculator;
|
|
for(const auto &part : chunk.chunk_parts) {
|
|
+#pragma GCC diagnostic push
|
|
+#pragma GCC diagnostic ignored "-Wfree-nonheap-object"
|
|
chunk_calculator.addPart(part.chunkType, MediaLabel::kWildcard);
|
|
+#pragma GCC diagnostic pop
|
|
}
|
|
chunk_calculator.evalRedundancyLevel();
|
|
if (chunk.chunk_parts.size() > 0) {
|
|
diff --git a/src/uraft/main.cc b/src/uraft/main.cc
|
|
index 6e1be1214..7a05fdb99 100644
|
|
--- a/src/uraft/main.cc
|
|
+++ b/src/uraft/main.cc
|
|
@@ -11,6 +11,7 @@
|
|
#include <fstream>
|
|
#include <iostream>
|
|
|
|
+#define BOOST_BIND_GLOBAL_PLACEHOLDERS
|
|
#include <boost/bind.hpp>
|
|
#include <boost/lexical_cast.hpp>
|
|
#include <boost/program_options.hpp>
|
|
diff --git a/src/uraft/uraft.cc b/src/uraft/uraft.cc
|
|
index f6439b82f..05d88d122 100644
|
|
--- a/src/uraft/uraft.cc
|
|
+++ b/src/uraft/uraft.cc
|
|
@@ -6,6 +6,7 @@
|
|
#include <ifaddrs.h>
|
|
#endif
|
|
|
|
+#define BOOST_BIND_GLOBAL_PLACEHOLDERS
|
|
#include <boost/bind.hpp>
|
|
#include <boost/date_time/posix_time/posix_time.hpp>
|
|
|
|
diff --git a/src/uraft/uraftcontroller.cc b/src/uraft/uraftcontroller.cc
|
|
index f46178fd1..53af6e1a8 100644
|
|
--- a/src/uraft/uraftcontroller.cc
|
|
+++ b/src/uraft/uraftcontroller.cc
|
|
@@ -10,6 +10,7 @@
|
|
#include <iostream>
|
|
#include <stdexcept>
|
|
|
|
+#define BOOST_BIND_GLOBAL_PLACEHOLDERS
|
|
#include <boost/bind.hpp>
|
|
#include <boost/lexical_cast.hpp>
|
|
#include <boost/version.hpp>
|