summarylogtreecommitdiffstats
path: root/0001-fix-compilation-with-gcc-14.patch
blob: 8deb9a5634d19c342af301ef2984784e9acdf759 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
From 8643ab27333579d2dd4946c515ae04f3f5cc9891 Mon Sep 17 00:00:00 2001
From: Liao Junxuan <mikeljx@126.com>
Date: Fri, 19 Jul 2024 14:16:07 +0800
Subject: [PATCH] fix compilation with gcc 14

With gcc 14, building fails with the following error:
> error: template-id not allowed for destructor in C++20 [-Werror=
> template-id-cdtor]
---
 clients/drcachesim/reader/compressed_file_reader.cpp | 4 ++--
 clients/drcachesim/reader/lz4_file_reader.cpp        | 2 +-
 clients/drcachesim/reader/record_file_reader.cpp     | 2 +-
 clients/drcachesim/reader/snappy_file_reader.cpp     | 2 +-
 clients/drcachesim/reader/zipfile_file_reader.cpp    | 4 ++--
 5 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/clients/drcachesim/reader/compressed_file_reader.cpp b/clients/drcachesim/reader/compressed_file_reader.cpp
index 03af3f5d5..5007f5586 100644
--- a/clients/drcachesim/reader/compressed_file_reader.cpp
+++ b/clients/drcachesim/reader/compressed_file_reader.cpp
@@ -91,7 +91,7 @@ file_reader_t<gzip_reader_t>::file_reader_t()
 /* clang-format off */ /* (make vera++ newline-after-type check happy) */
 template <>
 /* clang-format on */
-file_reader_t<gzip_reader_t>::~file_reader_t<gzip_reader_t>()
+file_reader_t<gzip_reader_t>::~file_reader_t()
 {
     if (input_file_.file != nullptr) {
         gzclose(input_file_.file);
@@ -134,7 +134,7 @@ file_reader_t<gzip_reader_t>::read_next_entry()
 /* clang-format off */ /* (make vera++ newline-after-type check happy) */
 template <>
 /* clang-format on */
-record_file_reader_t<gzip_reader_t>::~record_file_reader_t<gzip_reader_t>()
+record_file_reader_t<gzip_reader_t>::~record_file_reader_t()
 {
     if (input_file_ != nullptr) {
         gzclose(input_file_->file);
diff --git a/clients/drcachesim/reader/lz4_file_reader.cpp b/clients/drcachesim/reader/lz4_file_reader.cpp
index 1cf7e2c58..cc79f9682 100644
--- a/clients/drcachesim/reader/lz4_file_reader.cpp
+++ b/clients/drcachesim/reader/lz4_file_reader.cpp
@@ -70,7 +70,7 @@ file_reader_t<lz4_reader_t>::file_reader_t()
 /* clang-format off */ /* (make vera++ newline-after-type check happy) */
 template <>
 /* clang-format on */
-file_reader_t<lz4_reader_t>::~file_reader_t<lz4_reader_t>()
+file_reader_t<lz4_reader_t>::~file_reader_t()
 {
     if (input_file_.file != nullptr) {
         delete input_file_.file;
diff --git a/clients/drcachesim/reader/record_file_reader.cpp b/clients/drcachesim/reader/record_file_reader.cpp
index 965e6f1a1..9b474f698 100644
--- a/clients/drcachesim/reader/record_file_reader.cpp
+++ b/clients/drcachesim/reader/record_file_reader.cpp
@@ -39,7 +39,7 @@ namespace drmemtrace {
 /* clang-format off */ /* (make vera++ newline-after-type check happy) */
 template <>
 /* clang-format on */
-record_file_reader_t<std::ifstream>::~record_file_reader_t<std::ifstream>()
+record_file_reader_t<std::ifstream>::~record_file_reader_t()
 {
 }
 
diff --git a/clients/drcachesim/reader/snappy_file_reader.cpp b/clients/drcachesim/reader/snappy_file_reader.cpp
index 1dd8bd57a..309b317f5 100644
--- a/clients/drcachesim/reader/snappy_file_reader.cpp
+++ b/clients/drcachesim/reader/snappy_file_reader.cpp
@@ -208,7 +208,7 @@ snappy_reader_t::read(size_t size, DR_PARAM_OUT void *to)
 /* clang-format off */ /* (make vera++ newline-after-type check happy) */
 template <>
 /* clang-format on */
-file_reader_t<snappy_reader_t>::~file_reader_t<snappy_reader_t>()
+file_reader_t<snappy_reader_t>::~file_reader_t()
 {
     // Empty.
 }
diff --git a/clients/drcachesim/reader/zipfile_file_reader.cpp b/clients/drcachesim/reader/zipfile_file_reader.cpp
index acd1aebd9..ab613d3ed 100644
--- a/clients/drcachesim/reader/zipfile_file_reader.cpp
+++ b/clients/drcachesim/reader/zipfile_file_reader.cpp
@@ -143,7 +143,7 @@ file_reader_t<zipfile_reader_t>::file_reader_t()
 /* clang-format off */ /* (make vera++ newline-after-type check happy) */
 template <>
 /* clang-format on */
-file_reader_t<zipfile_reader_t>::~file_reader_t<zipfile_reader_t>()
+file_reader_t<zipfile_reader_t>::~file_reader_t()
 {
     if (input_file_.file != nullptr) {
         unzClose(input_file_.file);
@@ -258,7 +258,7 @@ record_file_reader_t<zipfile_reader_t>::record_file_reader_t()
 }
 
 template <>
-record_file_reader_t<zipfile_reader_t>::~record_file_reader_t<zipfile_reader_t>()
+record_file_reader_t<zipfile_reader_t>::~record_file_reader_t()
 {
     if (input_file_->file != nullptr) {
         unzClose(input_file_->file);
-- 
2.45.2