mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-08-31 09:08:08 -07:00
sys-cluster/ceph: fix build issues with clang
add patches to fix build issues when using Clang: Closes: https://bugs.gentoo.org/960812 Signed-off-by: Z. Liu <zhixu.liu@gmail.com> Part-of: https://github.com/gentoo/gentoo/pull/45459 Signed-off-by: Sam James <sam@gentoo.org>
This commit is contained in:
@@ -241,8 +241,14 @@ PATCHES=(
|
||||
"${FILESDIR}/ceph-19.2.2-py313-3.patch"
|
||||
"${FILESDIR}/ceph-19.2.2-gcc15.patch"
|
||||
"${FILESDIR}/ceph-19.2.2-ipv6.patch"
|
||||
"${FILESDIR}/ceph-19.2.2-QATAPP-Fix-clang-16-compiling-issue.patch"
|
||||
"${FILESDIR}/ceph-19.2.2-add-option-to-build-agains-system-opentelemetry.patch"
|
||||
"${FILESDIR}/ceph-19.2.2-rbd-make-enums-statically-castable.patch"
|
||||
"${FILESDIR}/ceph-19.2.2-rgw-remove-FMT_STRING-to-fix-clang-20-build-failure.patch"
|
||||
"${FILESDIR}/ceph-19.2.2-rgw-update-to-latest-zpp_bits.h.patch"
|
||||
# https://bugs.gentoo.org/960812
|
||||
"${FILESDIR}/ceph-19.2.2-silent-unused-variable-warning.patch"
|
||||
"${FILESDIR}/ceph-19.2.2-src-mgr-make-enum-statically-castable.patch"
|
||||
)
|
||||
|
||||
check-reqs_export_vars() {
|
||||
|
||||
@@ -240,8 +240,14 @@ PATCHES=(
|
||||
"${FILESDIR}/ceph-19.2.2-py313-2.patch"
|
||||
"${FILESDIR}/ceph-19.2.2-py313-3.patch"
|
||||
"${FILESDIR}/ceph-19.2.2-gcc15.patch"
|
||||
"${FILESDIR}/ceph-19.2.2-QATAPP-Fix-clang-16-compiling-issue.patch"
|
||||
"${FILESDIR}/ceph-19.2.2-add-option-to-build-agains-system-opentelemetry.patch"
|
||||
"${FILESDIR}/ceph-19.2.2-rbd-make-enums-statically-castable.patch"
|
||||
"${FILESDIR}/ceph-19.2.2-rgw-remove-FMT_STRING-to-fix-clang-20-build-failure.patch"
|
||||
"${FILESDIR}/ceph-19.2.2-rgw-update-to-latest-zpp_bits.h.patch"
|
||||
# https://bugs.gentoo.org/960812
|
||||
"${FILESDIR}/ceph-19.2.2-silent-unused-variable-warning.patch"
|
||||
"${FILESDIR}/ceph-19.2.2-src-mgr-make-enum-statically-castable.patch"
|
||||
)
|
||||
|
||||
check-reqs_export_vars() {
|
||||
|
||||
@@ -218,8 +218,13 @@ PATCHES=(
|
||||
"${FILESDIR}/ceph-18.2.4-liburing.patch"
|
||||
"${FILESDIR}/ceph-18.2.4-spdk.patch"
|
||||
"${FILESDIR}/ceph-19.2.1-isa-l.patch"
|
||||
"${FILESDIR}/ceph-19.2.2-QATAPP-Fix-clang-16-compiling-issue.patch"
|
||||
"${FILESDIR}/ceph-19.2.2-add-option-to-build-agains-system-opentelemetry.patch"
|
||||
"${FILESDIR}/ceph-19.2.2-rbd-make-enums-statically-castable.patch"
|
||||
"${FILESDIR}/ceph-19.2.2-rgw-remove-FMT_STRING-to-fix-clang-20-build-failure.patch"
|
||||
# https://bugs.gentoo.org/960812
|
||||
"${FILESDIR}/ceph-19.2.2-silent-unused-variable-warning.patch"
|
||||
"${FILESDIR}/ceph-19.2.2-src-mgr-make-enum-statically-castable.patch"
|
||||
"${FILESDIR}/ceph-20.1.0-nvmeof.patch"
|
||||
)
|
||||
|
||||
|
||||
@@ -218,8 +218,13 @@ PATCHES=(
|
||||
"${FILESDIR}/ceph-18.2.4-liburing.patch"
|
||||
"${FILESDIR}/ceph-18.2.4-spdk.patch"
|
||||
"${FILESDIR}/ceph-19.2.1-isa-l.patch"
|
||||
"${FILESDIR}/ceph-19.2.2-QATAPP-Fix-clang-16-compiling-issue.patch"
|
||||
"${FILESDIR}/ceph-19.2.2-add-option-to-build-agains-system-opentelemetry.patch"
|
||||
"${FILESDIR}/ceph-19.2.2-rbd-make-enums-statically-castable.patch"
|
||||
"${FILESDIR}/ceph-19.2.2-rgw-remove-FMT_STRING-to-fix-clang-20-build-failure.patch"
|
||||
# https://bugs.gentoo.org/960812
|
||||
"${FILESDIR}/ceph-19.2.2-silent-unused-variable-warning.patch"
|
||||
"${FILESDIR}/ceph-19.2.2-src-mgr-make-enum-statically-castable.patch"
|
||||
"${FILESDIR}/ceph-20.1.0-nvmeof.patch"
|
||||
)
|
||||
|
||||
|
||||
@@ -0,0 +1,175 @@
|
||||
https://github.com/intel/QATzip/commit/a71a7f210d4329582c95dbe859c46ddff1690f25
|
||||
|
||||
patch on 'include/qz_utils.h' is removed because of not appliable to ceph
|
||||
|
||||
From a71a7f210d4329582c95dbe859c46ddff1690f25 Mon Sep 17 00:00:00 2001
|
||||
From: Zhu Chengfei <chengfeix.zhu@intel.com>
|
||||
Date: Fri, 23 Aug 2024 06:34:26 -0400
|
||||
Subject: [PATCH] QATAPP-31772: Fix clang-16 compiling issue
|
||||
|
||||
* Fix function declaration without a prototype
|
||||
* Fix no newline at end of file src/qatzip_sw.c
|
||||
* Fix compiling issue [-Wgnu-zero-variadic-macro-arguments]
|
||||
|
||||
Signed-off-by: Zhu Chengfei <chengfeix.zhu@intel.com>
|
||||
Signed-off-by: David Qian <david.qian@intel.com>
|
||||
|
||||
diff --git a/src/qatzip/src/qatzip_internal.h b/src/qatzip/src/qatzip_internal.h
|
||||
index 882c798..a784d53 100755
|
||||
--- a/src/qatzip/src/qatzip_internal.h
|
||||
+++ b/src/qatzip/src/qatzip_internal.h
|
||||
@@ -448,7 +448,7 @@ void cleanUpInstMem(int i);
|
||||
|
||||
void qzMemDestory(void);
|
||||
|
||||
-void streamBufferCleanup();
|
||||
+void streamBufferCleanup(void);
|
||||
|
||||
//lz4 functions
|
||||
unsigned long qzLZ4HeaderSz(void);
|
||||
diff --git a/src/qatzip/src/qatzip_lz4.c b/src/qatzip/src/qatzip_lz4.c
|
||||
index 8fd19ab..8ccd277 100644
|
||||
--- a/src/qatzip/src/qatzip_lz4.c
|
||||
+++ b/src/qatzip/src/qatzip_lz4.c
|
||||
@@ -49,12 +49,12 @@
|
||||
#include "qatzip_internal.h"
|
||||
#include "qz_utils.h"
|
||||
|
||||
-inline unsigned long qzLZ4HeaderSz()
|
||||
+inline unsigned long qzLZ4HeaderSz(void)
|
||||
{
|
||||
return QZ_LZ4_HEADER_SIZE;
|
||||
}
|
||||
|
||||
-inline unsigned long qzLZ4FooterSz()
|
||||
+inline unsigned long qzLZ4FooterSz(void)
|
||||
{
|
||||
return QZ_LZ4_FOOTER_SIZE;
|
||||
}
|
||||
diff --git a/src/qatzip/src/qatzip_stream.c b/src/qatzip/src/qatzip_stream.c
|
||||
index 307e7db..418daf3 100644
|
||||
--- a/src/qatzip/src/qatzip_stream.c
|
||||
+++ b/src/qatzip/src/qatzip_stream.c
|
||||
@@ -125,7 +125,7 @@ static inline int removeNodeFromList(StreamBuffNode_T *node,
|
||||
return SUCCESS;
|
||||
}
|
||||
|
||||
-void streamBufferCleanup()
|
||||
+void streamBufferCleanup(void)
|
||||
{
|
||||
StreamBuffNode_T *node;
|
||||
StreamBuffNode_T *next;
|
||||
diff --git a/src/qatzip/test/bt.c b/src/qatzip/test/bt.c
|
||||
index 8382a2b..7f788cc 100755
|
||||
--- a/src/qatzip/test/bt.c
|
||||
+++ b/src/qatzip/test/bt.c
|
||||
@@ -42,7 +42,7 @@
|
||||
|
||||
#define DEFAULT_BUF_LEN (256*1024)
|
||||
|
||||
-void usage()
|
||||
+void usage(void)
|
||||
{
|
||||
printf("-f fit decompress buffers to size (default full buffers)\n");
|
||||
printf("-s skip specific number of bytes\n");
|
||||
diff --git a/src/qatzip/test/main.c b/src/qatzip/test/main.c
|
||||
index 9329142..b43de11 100755
|
||||
--- a/src/qatzip/test/main.c
|
||||
+++ b/src/qatzip/test/main.c
|
||||
@@ -196,10 +196,9 @@ static bool g_perf_svm = false;
|
||||
|
||||
static struct timeval g_timers[100][100];
|
||||
static struct timeval g_timer_start;
|
||||
-extern void dumpAllCounters();
|
||||
+extern void dumpAllCounters(void);
|
||||
static int test_thread_safe_flag = 0;
|
||||
extern processData_T g_process;
|
||||
-extern int errno;
|
||||
|
||||
QzBlock_T *parseFormatOption(char *buf)
|
||||
{
|
||||
diff --git a/src/qatzip/utils/qzip.c b/src/qatzip/utils/qzip.c
|
||||
index 9abf7cf..1a23535 100644
|
||||
--- a/src/qatzip/utils/qzip.c
|
||||
+++ b/src/qatzip/utils/qzip.c
|
||||
@@ -754,7 +754,7 @@ void processFile(QzSession_T *sess, const char *in_name,
|
||||
}
|
||||
}
|
||||
|
||||
-void version()
|
||||
+void version(void)
|
||||
{
|
||||
char const *const *p = g_license_msg;
|
||||
|
||||
diff --git a/src/qatzip/utils/qzip.h b/src/qatzip/utils/qzip.h
|
||||
index aebaf83..f60af04 100644
|
||||
--- a/src/qatzip/utils/qzip.h
|
||||
+++ b/src/qatzip/utils/qzip.h
|
||||
@@ -655,7 +655,7 @@ Qz7zStreamsInfo_T *resolveMainStreamsInfo(FILE *fp);
|
||||
Qz7zEndHeader_T *resolveEndHeader(FILE *fp, Qz7zSignatureHeader_T *sheader);
|
||||
|
||||
/* create catagory list */
|
||||
-QzCatagoryTable_T *createCatagoryList();
|
||||
+QzCatagoryTable_T *createCatagoryList(void);
|
||||
int scanFilesIntoCatagory(Qz7zItemList_T *the_list);
|
||||
/*
|
||||
* generate functions
|
||||
@@ -743,7 +743,7 @@ void displayStats(RunTimeList_T *time_list,
|
||||
|
||||
void tryHelp(void);
|
||||
void help(void);
|
||||
-void version();
|
||||
+void version(void);
|
||||
char *qzipBaseName(char *fname);
|
||||
QzSuffix_T getSuffix(const char *filename);
|
||||
bool hasSuffix(const char *fname);
|
||||
@@ -801,6 +801,5 @@ extern const unsigned int g_bufsz_expansion_ratio[4];
|
||||
extern char const g_short_opts[];
|
||||
extern const struct option g_long_opts[];
|
||||
extern const unsigned int USDM_ALLOC_MAX_SZ;
|
||||
-extern int errno;
|
||||
|
||||
#endif
|
||||
diff --git a/src/qatzip/utils/qzip_7z.c b/src/qatzip/utils/qzip_7z.c
|
||||
index 102440b..525e05e 100644
|
||||
--- a/src/qatzip/utils/qzip_7z.c
|
||||
+++ b/src/qatzip/utils/qzip_7z.c
|
||||
@@ -2406,7 +2406,7 @@ QzListHead_T *qzListCreate(int num_per_node)
|
||||
return p;
|
||||
}
|
||||
|
||||
-Qz7zSignatureHeader_T *generateSignatureHeader()
|
||||
+Qz7zSignatureHeader_T *generateSignatureHeader(void)
|
||||
{
|
||||
Qz7zSignatureHeader_T *header = qzMalloc(sizeof(Qz7zSignatureHeader_T), 0,
|
||||
PINNED_MEM);
|
||||
@@ -2450,7 +2450,7 @@ Qz7zPackInfo_T *generatePackInfo(Qz7zItemList_T *the_list,
|
||||
return pack;
|
||||
}
|
||||
|
||||
-static Qz7zCoder_T *generateCoder()
|
||||
+static Qz7zCoder_T *generateCoder(void)
|
||||
{
|
||||
|
||||
Qz7zCoder_T *coder = qzMalloc(sizeof(Qz7zCoder_T), 0, PINNED_MEM);
|
||||
@@ -2666,7 +2666,7 @@ Qz7zStreamsInfo_T *generateStreamsInfo(Qz7zItemList_T *the_list,
|
||||
return streams;
|
||||
}
|
||||
|
||||
-Qz7zArchiveProperty_T *generatePropertyInfo()
|
||||
+Qz7zArchiveProperty_T *generatePropertyInfo(void)
|
||||
{
|
||||
Qz7zArchiveProperty_T *property = qzMalloc(sizeof(Qz7zArchiveProperty_T), 0,
|
||||
PINNED_MEM);
|
||||
@@ -2696,7 +2696,7 @@ Qz7zEndHeader_T *generateEndHeader(Qz7zItemList_T *the_list,
|
||||
return header;
|
||||
}
|
||||
|
||||
-QzCatagoryTable_T *createCatagoryList()
|
||||
+QzCatagoryTable_T *createCatagoryList(void)
|
||||
{
|
||||
QzCatagoryTable_T *cat_tbl;
|
||||
cat_tbl = malloc(sizeof(QzCatagoryTable_T));
|
||||
--
|
||||
2.49.1
|
||||
|
||||
@@ -0,0 +1,130 @@
|
||||
https://github.com/ceph/ceph/commit/a4b9bf76a2c04daf25799ae2785a700d204ce20c
|
||||
|
||||
From a4b9bf76a2c04daf25799ae2785a700d204ce20c Mon Sep 17 00:00:00 2001
|
||||
From: Dmitrii Sharshakov <d3dx12.xx@gmail.com>
|
||||
Date: Thu, 1 Jan 2026 13:32:07 +0100
|
||||
Subject: [PATCH] rbd: make enums statically castable
|
||||
|
||||
Fix the following compiler error:
|
||||
|
||||
in-class initializer for static data member is not a constant expression
|
||||
|
||||
Co-authored-by: Ilya Dryomov <idryomov@gmail.com>
|
||||
Signed-off-by: Dmitrii Sharshakov <d3dx12.xx@gmail.com>
|
||||
|
||||
diff --git a/src/cls/rbd/cls_rbd_types.h b/src/cls/rbd/cls_rbd_types.h
|
||||
index cd7cad2e88d..c81d49bb6b3 100644
|
||||
--- a/src/cls/rbd/cls_rbd_types.h
|
||||
+++ b/src/cls/rbd/cls_rbd_types.h
|
||||
@@ -423,7 +423,7 @@ struct GroupSpec {
|
||||
|
||||
WRITE_CLASS_ENCODER(GroupSpec);
|
||||
|
||||
-enum SnapshotNamespaceType {
|
||||
+enum SnapshotNamespaceType : uint32_t {
|
||||
SNAPSHOT_NAMESPACE_TYPE_USER = 0,
|
||||
SNAPSHOT_NAMESPACE_TYPE_GROUP = 1,
|
||||
SNAPSHOT_NAMESPACE_TYPE_TRASH = 2,
|
||||
diff --git a/src/librbd/journal/Types.h b/src/librbd/journal/Types.h
|
||||
index a7d2f4ef446..544a1aca7bd 100644
|
||||
--- a/src/librbd/journal/Types.h
|
||||
+++ b/src/librbd/journal/Types.h
|
||||
@@ -25,7 +25,7 @@ class Formatter;
|
||||
namespace librbd {
|
||||
namespace journal {
|
||||
|
||||
-enum EventType {
|
||||
+enum EventType : uint32_t {
|
||||
EVENT_TYPE_AIO_DISCARD = 0,
|
||||
EVENT_TYPE_AIO_WRITE = 1,
|
||||
EVENT_TYPE_AIO_FLUSH = 2,
|
||||
@@ -464,7 +464,7 @@ private:
|
||||
|
||||
// Journal Client data structures
|
||||
|
||||
-enum ClientMetaType {
|
||||
+enum ClientMetaType : uint32_t {
|
||||
IMAGE_CLIENT_META_TYPE = 0,
|
||||
MIRROR_PEER_CLIENT_META_TYPE = 1,
|
||||
CLI_CLIENT_META_TYPE = 2
|
||||
diff --git a/src/librbd/mirroring_watcher/Types.h b/src/librbd/mirroring_watcher/Types.h
|
||||
index c837e208d3e..1d0c6b8b46b 100644
|
||||
--- a/src/librbd/mirroring_watcher/Types.h
|
||||
+++ b/src/librbd/mirroring_watcher/Types.h
|
||||
@@ -18,7 +18,7 @@ namespace ceph { class Formatter; }
|
||||
namespace librbd {
|
||||
namespace mirroring_watcher {
|
||||
|
||||
-enum NotifyOp {
|
||||
+enum NotifyOp : uint32_t {
|
||||
NOTIFY_OP_MODE_UPDATED = 0,
|
||||
NOTIFY_OP_IMAGE_UPDATED = 1
|
||||
};
|
||||
diff --git a/src/librbd/trash_watcher/Types.h b/src/librbd/trash_watcher/Types.h
|
||||
index ba6cd9ff2f8..b3b42ba2163 100644
|
||||
--- a/src/librbd/trash_watcher/Types.h
|
||||
+++ b/src/librbd/trash_watcher/Types.h
|
||||
@@ -17,7 +17,7 @@
|
||||
namespace librbd {
|
||||
namespace trash_watcher {
|
||||
|
||||
-enum NotifyOp {
|
||||
+enum NotifyOp : uint32_t {
|
||||
NOTIFY_OP_IMAGE_ADDED = 0,
|
||||
NOTIFY_OP_IMAGE_REMOVED = 1
|
||||
};
|
||||
diff --git a/src/rbd_replay/ActionTypes.h b/src/rbd_replay/ActionTypes.h
|
||||
index 585d756ea9d..e4103d1dcde 100644
|
||||
--- a/src/rbd_replay/ActionTypes.h
|
||||
+++ b/src/rbd_replay/ActionTypes.h
|
||||
@@ -61,7 +61,7 @@ WRITE_CLASS_ENCODER(Dependency);
|
||||
|
||||
typedef std::vector<Dependency> Dependencies;
|
||||
|
||||
-enum ActionType {
|
||||
+enum ActionType : uint8_t {
|
||||
ACTION_TYPE_START_THREAD = 0,
|
||||
ACTION_TYPE_STOP_THREAD = 1,
|
||||
ACTION_TYPE_READ = 2,
|
||||
diff --git a/src/tools/rbd_mirror/image_map/Types.h b/src/tools/rbd_mirror/image_map/Types.h
|
||||
index 871bc5ffffa..77efda17dc3 100644
|
||||
--- a/src/tools/rbd_mirror/image_map/Types.h
|
||||
+++ b/src/tools/rbd_mirror/image_map/Types.h
|
||||
@@ -60,7 +60,7 @@ typedef std::vector<std::string> InstanceIds;
|
||||
typedef std::set<std::string> GlobalImageIds;
|
||||
typedef std::map<std::string, ActionType> ImageActionTypes;
|
||||
|
||||
-enum PolicyMetaType {
|
||||
+enum PolicyMetaType : uint32_t {
|
||||
POLICY_META_TYPE_NONE = 0,
|
||||
};
|
||||
|
||||
diff --git a/src/tools/rbd_mirror/instance_watcher/Types.h b/src/tools/rbd_mirror/instance_watcher/Types.h
|
||||
index 6bb430d36aa..549113a2853 100644
|
||||
--- a/src/tools/rbd_mirror/instance_watcher/Types.h
|
||||
+++ b/src/tools/rbd_mirror/instance_watcher/Types.h
|
||||
@@ -18,7 +18,7 @@ namespace rbd {
|
||||
namespace mirror {
|
||||
namespace instance_watcher {
|
||||
|
||||
-enum NotifyOp {
|
||||
+enum NotifyOp : uint32_t {
|
||||
NOTIFY_OP_IMAGE_ACQUIRE = 0,
|
||||
NOTIFY_OP_IMAGE_RELEASE = 1,
|
||||
NOTIFY_OP_PEER_IMAGE_REMOVED = 2,
|
||||
diff --git a/src/tools/rbd_mirror/leader_watcher/Types.h b/src/tools/rbd_mirror/leader_watcher/Types.h
|
||||
index 0e987c4eb04..2f20e451843 100644
|
||||
--- a/src/tools/rbd_mirror/leader_watcher/Types.h
|
||||
+++ b/src/tools/rbd_mirror/leader_watcher/Types.h
|
||||
@@ -35,7 +35,7 @@ struct Listener {
|
||||
virtual void handle_instances_removed(const InstanceIds& instance_ids) = 0;
|
||||
};
|
||||
|
||||
-enum NotifyOp {
|
||||
+enum NotifyOp : uint32_t {
|
||||
NOTIFY_OP_HEARTBEAT = 0,
|
||||
NOTIFY_OP_LOCK_ACQUIRED = 1,
|
||||
NOTIFY_OP_LOCK_RELEASED = 2,
|
||||
--
|
||||
2.49.1
|
||||
|
||||
@@ -0,0 +1,236 @@
|
||||
https://github.com/ceph/ceph/commit/3fcd35367283beee3c02b73dc77b7c51028d59dc
|
||||
|
||||
From 3fcd35367283beee3c02b73dc77b7c51028d59dc Mon Sep 17 00:00:00 2001
|
||||
From: Matt Benjamin <mbenjamin@redhat.com>
|
||||
Date: Tue, 28 Jan 2025 15:07:06 -0500
|
||||
Subject: [PATCH] rgw: update to latest zpp_bits.h to compile w/gcc-14 & clang
|
||||
19
|
||||
|
||||
Fixes: https://tracker.ceph.com/issues/69696
|
||||
|
||||
Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
|
||||
|
||||
diff --git a/src/rgw/driver/posix/zpp_bits.h b/src/rgw/driver/posix/zpp_bits.h
|
||||
index 229b0d6d20d..b319aa8f3fb 100644
|
||||
--- a/src/rgw/driver/posix/zpp_bits.h
|
||||
+++ b/src/rgw/driver/posix/zpp_bits.h
|
||||
@@ -1,10 +1,3 @@
|
||||
-/*
|
||||
-MIT License
|
||||
-
|
||||
-Copyright (c) 2021 Eyal Z
|
||||
-
|
||||
-Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
-*/
|
||||
#ifndef ZPP_BITS_H
|
||||
#define ZPP_BITS_H
|
||||
|
||||
@@ -2687,8 +2680,12 @@ private:
|
||||
{
|
||||
using type = std::remove_cvref_t<decltype(container)>;
|
||||
using value_type = typename type::value_type;
|
||||
- constexpr auto is_const = std::is_const_v<
|
||||
- std::remove_reference_t<decltype(container[0])>>;
|
||||
+ constexpr auto is_const =
|
||||
+ std::is_const_v<std::remove_reference_t<value_type>> ||
|
||||
+ requires {
|
||||
+ requires std::is_const_v<
|
||||
+ std::remove_reference_t<decltype(container[0])>>;
|
||||
+ };
|
||||
|
||||
if constexpr (!std::is_void_v<SizeType> &&
|
||||
(requires(type container) { container.resize(1); } ||
|
||||
@@ -2827,9 +2824,7 @@ private:
|
||||
if constexpr (requires { typename type::mapped_type; }) {
|
||||
using value_type = std::pair<typename type::key_type,
|
||||
typename type::mapped_type>;
|
||||
- std::aligned_storage_t<sizeof(value_type),
|
||||
- alignof(value_type)>
|
||||
- storage;
|
||||
+ alignas(value_type) std::byte storage[sizeof(value_type)];
|
||||
|
||||
auto object = access::placement_new<value_type>(
|
||||
std::addressof(storage));
|
||||
@@ -2843,9 +2838,7 @@ private:
|
||||
} else {
|
||||
using value_type = typename type::value_type;
|
||||
|
||||
- std::aligned_storage_t<sizeof(value_type),
|
||||
- alignof(value_type)>
|
||||
- storage;
|
||||
+ alignas(value_type) std::byte storage[sizeof(value_type)];
|
||||
|
||||
auto object = access::placement_new<value_type>(
|
||||
std::addressof(storage));
|
||||
@@ -2903,8 +2896,7 @@ private:
|
||||
return result;
|
||||
}
|
||||
} else {
|
||||
- std::aligned_storage_t<sizeof(value_type), alignof(value_type)>
|
||||
- storage;
|
||||
+ alignas(value_type) std::byte storage[sizeof(value_type)];
|
||||
|
||||
auto object =
|
||||
access::placement_new<value_type>(std::addressof(storage));
|
||||
@@ -2947,9 +2939,7 @@ private:
|
||||
}
|
||||
return serialize_one(*std::get_if<element_type>(&variant));
|
||||
} else {
|
||||
- std::aligned_storage_t<sizeof(element_type),
|
||||
- alignof(element_type)>
|
||||
- storage;
|
||||
+ alignas(element_type) std::byte storage[sizeof(element_type)];
|
||||
|
||||
auto object = access::placement_new<element_type>(
|
||||
std::addressof(storage));
|
||||
@@ -2996,8 +2986,7 @@ private:
|
||||
return self.serialize_one(
|
||||
*std::get_if<Types>(&variant));
|
||||
} else {
|
||||
- std::aligned_storage_t<sizeof(Types), alignof(Types)>
|
||||
- storage;
|
||||
+ alignas(Types) std::byte storage[sizeof(Types)];
|
||||
|
||||
auto object = access::placement_new<Types>(
|
||||
std::addressof(storage));
|
||||
@@ -3008,6 +2997,7 @@ private:
|
||||
return result;
|
||||
}
|
||||
variant = std::move(*object);
|
||||
+ return errc{};
|
||||
}
|
||||
}...};
|
||||
|
||||
@@ -3307,7 +3297,7 @@ struct known_dynamic_id_variant
|
||||
ZPP_BITS_INLINE constexpr static auto serialize(auto & serializer,
|
||||
auto & self)
|
||||
{
|
||||
- return serializer.template serialize_one(self.variant, self.id);
|
||||
+ return serializer.serialize_one(self.variant, self.id);
|
||||
}
|
||||
|
||||
Variant & variant;
|
||||
@@ -3448,7 +3438,8 @@ struct [[nodiscard]] value_or_errc
|
||||
}
|
||||
|
||||
constexpr explicit value_or_errc(error_type error) :
|
||||
- m_error(std::forward<decltype(error)>(error))
|
||||
+ m_error(std::forward<decltype(error)>(error)),
|
||||
+ m_failure(true)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -5029,9 +5020,7 @@ struct pb
|
||||
serialize use();
|
||||
};
|
||||
|
||||
- std::aligned_storage_t<sizeof(value_type),
|
||||
- alignof(value_type)>
|
||||
- storage;
|
||||
+ alignas(value_type) std::byte storage[sizeof(value_type)];
|
||||
|
||||
auto object =
|
||||
access::placement_new<value_type>(std::addressof(storage));
|
||||
@@ -5111,9 +5100,7 @@ struct pb
|
||||
return errc{};
|
||||
}
|
||||
} else {
|
||||
- std::aligned_storage_t<sizeof(value_type),
|
||||
- alignof(value_type)>
|
||||
- storage;
|
||||
+ alignas(value_type) std::byte storage[sizeof(value_type)];
|
||||
|
||||
auto object = access::placement_new<value_type>(
|
||||
std::addressof(storage));
|
||||
@@ -5382,47 +5369,47 @@ constexpr auto sha256()
|
||||
};
|
||||
auto align = [](auto v, auto a) { return (v + (a - 1)) / a * a; };
|
||||
|
||||
- auto h0 = big_endian{0x6a09e667u};
|
||||
- auto h1 = big_endian{0xbb67ae85u};
|
||||
- auto h2 = big_endian{0x3c6ef372u};
|
||||
- auto h3 = big_endian{0xa54ff53au};
|
||||
- auto h4 = big_endian{0x510e527fu};
|
||||
- auto h5 = big_endian{0x9b05688cu};
|
||||
- auto h6 = big_endian{0x1f83d9abu};
|
||||
- auto h7 = big_endian{0x5be0cd19u};
|
||||
-
|
||||
- std::array k{big_endian{0x428a2f98u}, big_endian{0x71374491u},
|
||||
- big_endian{0xb5c0fbcfu}, big_endian{0xe9b5dba5u},
|
||||
- big_endian{0x3956c25bu}, big_endian{0x59f111f1u},
|
||||
- big_endian{0x923f82a4u}, big_endian{0xab1c5ed5u},
|
||||
- big_endian{0xd807aa98u}, big_endian{0x12835b01u},
|
||||
- big_endian{0x243185beu}, big_endian{0x550c7dc3u},
|
||||
- big_endian{0x72be5d74u}, big_endian{0x80deb1feu},
|
||||
- big_endian{0x9bdc06a7u}, big_endian{0xc19bf174u},
|
||||
- big_endian{0xe49b69c1u}, big_endian{0xefbe4786u},
|
||||
- big_endian{0x0fc19dc6u}, big_endian{0x240ca1ccu},
|
||||
- big_endian{0x2de92c6fu}, big_endian{0x4a7484aau},
|
||||
- big_endian{0x5cb0a9dcu}, big_endian{0x76f988dau},
|
||||
- big_endian{0x983e5152u}, big_endian{0xa831c66du},
|
||||
- big_endian{0xb00327c8u}, big_endian{0xbf597fc7u},
|
||||
- big_endian{0xc6e00bf3u}, big_endian{0xd5a79147u},
|
||||
- big_endian{0x06ca6351u}, big_endian{0x14292967u},
|
||||
- big_endian{0x27b70a85u}, big_endian{0x2e1b2138u},
|
||||
- big_endian{0x4d2c6dfcu}, big_endian{0x53380d13u},
|
||||
- big_endian{0x650a7354u}, big_endian{0x766a0abbu},
|
||||
- big_endian{0x81c2c92eu}, big_endian{0x92722c85u},
|
||||
- big_endian{0xa2bfe8a1u}, big_endian{0xa81a664bu},
|
||||
- big_endian{0xc24b8b70u}, big_endian{0xc76c51a3u},
|
||||
- big_endian{0xd192e819u}, big_endian{0xd6990624u},
|
||||
- big_endian{0xf40e3585u}, big_endian{0x106aa070u},
|
||||
- big_endian{0x19a4c116u}, big_endian{0x1e376c08u},
|
||||
- big_endian{0x2748774cu}, big_endian{0x34b0bcb5u},
|
||||
- big_endian{0x391c0cb3u}, big_endian{0x4ed8aa4au},
|
||||
- big_endian{0x5b9cca4fu}, big_endian{0x682e6ff3u},
|
||||
- big_endian{0x748f82eeu}, big_endian{0x78a5636fu},
|
||||
- big_endian{0x84c87814u}, big_endian{0x8cc70208u},
|
||||
- big_endian{0x90befffau}, big_endian{0xa4506cebu},
|
||||
- big_endian{0xbef9a3f7u}, big_endian{0xc67178f2u}};
|
||||
+ auto h0 = big_endian{std::uint32_t{0x6a09e667u}};
|
||||
+ auto h1 = big_endian{std::uint32_t{0xbb67ae85u}};
|
||||
+ auto h2 = big_endian{std::uint32_t{0x3c6ef372u}};
|
||||
+ auto h3 = big_endian{std::uint32_t{0xa54ff53au}};
|
||||
+ auto h4 = big_endian{std::uint32_t{0x510e527fu}};
|
||||
+ auto h5 = big_endian{std::uint32_t{0x9b05688cu}};
|
||||
+ auto h6 = big_endian{std::uint32_t{0x1f83d9abu}};
|
||||
+ auto h7 = big_endian{std::uint32_t{0x5be0cd19u}};
|
||||
+
|
||||
+ std::array k{big_endian{std::uint32_t{0x428a2f98u}}, big_endian{std::uint32_t{0x71374491u}},
|
||||
+ big_endian{std::uint32_t{0xb5c0fbcfu}}, big_endian{std::uint32_t{0xe9b5dba5u}},
|
||||
+ big_endian{std::uint32_t{0x3956c25bu}}, big_endian{std::uint32_t{0x59f111f1u}},
|
||||
+ big_endian{std::uint32_t{0x923f82a4u}}, big_endian{std::uint32_t{0xab1c5ed5u}},
|
||||
+ big_endian{std::uint32_t{0xd807aa98u}}, big_endian{std::uint32_t{0x12835b01u}},
|
||||
+ big_endian{std::uint32_t{0x243185beu}}, big_endian{std::uint32_t{0x550c7dc3u}},
|
||||
+ big_endian{std::uint32_t{0x72be5d74u}}, big_endian{std::uint32_t{0x80deb1feu}},
|
||||
+ big_endian{std::uint32_t{0x9bdc06a7u}}, big_endian{std::uint32_t{0xc19bf174u}},
|
||||
+ big_endian{std::uint32_t{0xe49b69c1u}}, big_endian{std::uint32_t{0xefbe4786u}},
|
||||
+ big_endian{std::uint32_t{0x0fc19dc6u}}, big_endian{std::uint32_t{0x240ca1ccu}},
|
||||
+ big_endian{std::uint32_t{0x2de92c6fu}}, big_endian{std::uint32_t{0x4a7484aau}},
|
||||
+ big_endian{std::uint32_t{0x5cb0a9dcu}}, big_endian{std::uint32_t{0x76f988dau}},
|
||||
+ big_endian{std::uint32_t{0x983e5152u}}, big_endian{std::uint32_t{0xa831c66du}},
|
||||
+ big_endian{std::uint32_t{0xb00327c8u}}, big_endian{std::uint32_t{0xbf597fc7u}},
|
||||
+ big_endian{std::uint32_t{0xc6e00bf3u}}, big_endian{std::uint32_t{0xd5a79147u}},
|
||||
+ big_endian{std::uint32_t{0x06ca6351u}}, big_endian{std::uint32_t{0x14292967u}},
|
||||
+ big_endian{std::uint32_t{0x27b70a85u}}, big_endian{std::uint32_t{0x2e1b2138u}},
|
||||
+ big_endian{std::uint32_t{0x4d2c6dfcu}}, big_endian{std::uint32_t{0x53380d13u}},
|
||||
+ big_endian{std::uint32_t{0x650a7354u}}, big_endian{std::uint32_t{0x766a0abbu}},
|
||||
+ big_endian{std::uint32_t{0x81c2c92eu}}, big_endian{std::uint32_t{0x92722c85u}},
|
||||
+ big_endian{std::uint32_t{0xa2bfe8a1u}}, big_endian{std::uint32_t{0xa81a664bu}},
|
||||
+ big_endian{std::uint32_t{0xc24b8b70u}}, big_endian{std::uint32_t{0xc76c51a3u}},
|
||||
+ big_endian{std::uint32_t{0xd192e819u}}, big_endian{std::uint32_t{0xd6990624u}},
|
||||
+ big_endian{std::uint32_t{0xf40e3585u}}, big_endian{std::uint32_t{0x106aa070u}},
|
||||
+ big_endian{std::uint32_t{0x19a4c116u}}, big_endian{std::uint32_t{0x1e376c08u}},
|
||||
+ big_endian{std::uint32_t{0x2748774cu}}, big_endian{std::uint32_t{0x34b0bcb5u}},
|
||||
+ big_endian{std::uint32_t{0x391c0cb3u}}, big_endian{std::uint32_t{0x4ed8aa4au}},
|
||||
+ big_endian{std::uint32_t{0x5b9cca4fu}}, big_endian{std::uint32_t{0x682e6ff3u}},
|
||||
+ big_endian{std::uint32_t{0x748f82eeu}}, big_endian{std::uint32_t{0x78a5636fu}},
|
||||
+ big_endian{std::uint32_t{0x84c87814u}}, big_endian{std::uint32_t{0x8cc70208u}},
|
||||
+ big_endian{std::uint32_t{0x90befffau}}, big_endian{std::uint32_t{0xa4506cebu}},
|
||||
+ big_endian{std::uint32_t{0xbef9a3f7u}}, big_endian{std::uint32_t{0xc67178f2u}}};
|
||||
|
||||
constexpr auto original_message = to_bytes<Object>();
|
||||
constexpr auto chunk_size = 512 / CHAR_BIT;
|
||||
--
|
||||
2.49.1
|
||||
|
||||
@@ -0,0 +1,48 @@
|
||||
https://github.com/intel/QATzip/pull/131 but the patch below is not merged
|
||||
https://github.com/intel/QATzip/pull/119 using __attribute__((unused))
|
||||
|
||||
From d2a9a7694b4785f67d6f95b49c20f6b3984ffe99 Mon Sep 17 00:00:00 2001
|
||||
From: "Z. Liu" <zhixu.liu@gmail.com>
|
||||
Date: Fri, 21 Mar 2025 03:01:53 +0000
|
||||
Subject: [PATCH] silent unused variable warning
|
||||
|
||||
such as:
|
||||
> error: variable 'sleep_cnt' set but not used [-Werror,-Wunused-but-set-variable]
|
||||
|
||||
Signed-off-by: Z. Liu <zhixu.liu@gmail.com>
|
||||
|
||||
diff --git a/src/qatzip/src/qatzip.c b/src/qatzip/src/qatzip.c
|
||||
index 1a12973..ac73dcd 100755
|
||||
--- a/src/qatzip/src/qatzip.c
|
||||
+++ b/src/qatzip/src/qatzip.c
|
||||
@@ -1495,6 +1495,7 @@ static void *doCompressOut(void *in)
|
||||
CpaDcRqResults *resl;
|
||||
CpaStatus sts;
|
||||
unsigned int sleep_cnt = 0;
|
||||
+ (void)sleep_cnt;
|
||||
QzSession_T *sess = (QzSession_T *) in;
|
||||
QzSess_T *qz_sess = (QzSess_T *) sess->internal;
|
||||
long dest_avail_len = (long)(*qz_sess->dest_sz - qz_sess->qz_out_len);
|
||||
@@ -2124,6 +2125,7 @@ static void *__attribute__((cold)) doDecompressOut(void *in)
|
||||
CpaDcRqResults *resl;
|
||||
CpaStatus sts;
|
||||
unsigned int sleep_cnt = 0;
|
||||
+ (void)sleep_cnt;
|
||||
unsigned int done = 0;
|
||||
unsigned int src_send_sz;
|
||||
unsigned int dest_avail_len;
|
||||
diff --git a/src/qatzip/test/main.c b/src/qatzip/test/main.c
|
||||
index 8ba3384..19ecacb 100755
|
||||
--- a/src/qatzip/test/main.c
|
||||
+++ b/src/qatzip/test/main.c
|
||||
@@ -209,6 +209,7 @@ QzBlock_T *parseFormatOption(char *buf)
|
||||
char *saveptr, *sub_saveptr;
|
||||
|
||||
int i, j, fmt_idx;
|
||||
+ (void)j;
|
||||
unsigned int fmt_found = 0;
|
||||
QzBlock_T *blk = NULL;
|
||||
QzBlock_T *head, *prev, *r;
|
||||
--
|
||||
2.49.1
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
https://github.com/ceph/ceph/commit/856e550b37a0899e2fdda6b1f027093b6e205889
|
||||
|
||||
From 856e550b37a0899e2fdda6b1f027093b6e205889 Mon Sep 17 00:00:00 2001
|
||||
From: Dmitrii Sharshakov <d3dx12.xx@gmail.com>
|
||||
Date: Thu, 1 Jan 2026 13:33:41 +0100
|
||||
Subject: [PATCH] src/mgr: make enum statically castable
|
||||
|
||||
Fix the following compiler error:
|
||||
|
||||
in-class initializer for static data member is not a constant expression
|
||||
|
||||
Co-authored-by: Ilya Dryomov <idryomov@gmail.com>
|
||||
Signed-off-by: Dmitrii Sharshakov <d3dx12.xx@gmail.com>
|
||||
|
||||
diff --git a/src/mgr/MetricTypes.h b/src/mgr/MetricTypes.h
|
||||
index 0f8ae16990f..37cafa2b92a 100644
|
||||
--- a/src/mgr/MetricTypes.h
|
||||
+++ b/src/mgr/MetricTypes.h
|
||||
@@ -193,7 +193,7 @@ WRITE_CLASS_ENCODER(MetricReportMessage);
|
||||
|
||||
// variant for sending configure message to mgr clients
|
||||
|
||||
-enum MetricConfigType {
|
||||
+enum MetricConfigType : uint32_t {
|
||||
METRIC_CONFIG_TYPE_OSD = 0,
|
||||
METRIC_CONFIG_TYPE_MDS = 1,
|
||||
};
|
||||
--
|
||||
2.49.1
|
||||
|
||||
Reference in New Issue
Block a user