Skip to content

Commit d8d5a65

Browse files
author
Huang-Ming Huang
committed
Fix some g++ 4.8 warning messages.
1 parent d0803d0 commit d8d5a65

File tree

8 files changed

+12
-12
lines changed

8 files changed

+12
-12
lines changed

src/fast_type_gen/fast_type_gen.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ bool check_long_option(const std::string &command, int argc, const char **argv,
3939
}
4040
}
4141

42-
bool check_short_option(const std::string &command, int argc, const char **argv, int &i, const char *&arg, char flag, const char *&output, bool bad)
42+
bool check_short_option(const std::string &command, int argc, const char **argv, int &i, const char *&arg, char flag, const char *&output, bool &bad)
4343
{
4444
if (*arg == flag) {
4545
if (*++arg != '\0') {

src/mfast/decimal_ref.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,7 @@ class decimal_mref : public make_field_mref<decimal_cref> {
262262
instruction_cptr instruction)
263263
: base_type(alloc, storage, instruction) {}
264264

265-
decimal_mref(const decimal_mref &other) = default;
265+
decimal_mref(const decimal_mref &) = default;
266266

267267
explicit decimal_mref(const field_mref_base &other) : base_type(other) {}
268268
int64_t mantissa() const { return this->storage()->of_decimal.mantissa_; }

src/mfast/enum_ref.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ class enum_mref : public make_field_mref<enum_cref> {
6868
instruction_cptr instruction)
6969
: base_type(alloc, storage, instruction) {}
7070

71-
enum_mref(const enum_mref &other) = default;
71+
enum_mref(const enum_mref &) = default;
7272

7373
void as(const enum_cref &cref) const {
7474
if (cref.absent()) {

src/mfast/int_ref.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ template <typename T> class int_mref : public make_field_mref<int_cref<T>> {
8282
instruction_cptr instruction)
8383
: base_type(alloc, storage, instruction) {}
8484

85-
int_mref(const int_mref &other) = default;
85+
int_mref(const int_mref &) = default;
8686

8787
explicit int_mref(const field_mref_base &other) : base_type(other) {}
8888
void as(const int_cref<T> &cref) const {

src/mfast/sequence_ref.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ class sequence_element_cref : public aggregate_cref {
2323
sequence_element_cref(const value_storage *storage,
2424
instruction_cptr instruction);
2525

26-
sequence_element_cref(const sequence_element_cref &other) = default;
26+
sequence_element_cref(const sequence_element_cref &) = default;
2727
instruction_cptr instruction() const;
2828

2929
bool element_unnamed() const {

src/mfast/string_ref.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ template <> class vector_mref<char> : public string_mref_base<char> {
190190
instruction_cptr instruction)
191191
: base_type(alloc, storage, instruction) {}
192192

193-
vector_mref(const vector_mref<char> &other) = default;
193+
vector_mref(const vector_mref<char> &) = default;
194194

195195
explicit vector_mref(const field_mref_base &other) : base_type(other) {}
196196
vector_mref &operator=(const boost::string_ref &s) {

src/mfast/vector_ref.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ class vector_mref_base : public make_field_mref<vector_cref<T>> {
175175
instruction_cptr instruction)
176176
: base_type(alloc, storage, instruction) {}
177177

178-
vector_mref_base(const vector_mref_base &other) = default;
178+
vector_mref_base(const vector_mref_base &) = default;
179179

180180
explicit vector_mref_base(const field_mref_base &other) : base_type(other) {}
181181
void to_initial_value() const {

tests/int_vector_test.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -52,23 +52,23 @@ void test_int_vector()
5252
"int_vector","");
5353

5454
inst.construct_value(storage, &alloc);
55-
REQUIRE(storage.of_array.capacity_in_bytes_ == 0UL);
56-
REQUIRE(storage.is_defined() == true);
55+
REQUIRE((storage.of_array.capacity_in_bytes_ == 0UL));
56+
REQUIRE((storage.is_defined() == true));
5757

5858
vector_mref<T> mref(&alloc, &storage, &inst);
5959

60-
REQUIRE(mref.size() == 0UL);
60+
REQUIRE((mref.size() == 0UL));
6161

6262
const unsigned SIZE=100;
6363
int array[SIZE];
6464
std::generate(array, array+SIZE, c_unique());
6565

6666
mref.assign(array, array+SIZE);
6767

68-
REQUIRE(mref.size() == SIZE);
68+
REQUIRE((mref.size() == SIZE));
6969

7070
for (unsigned i = 0; i < SIZE; ++i) {
71-
REQUIRE(mref[i] == static_cast<T>(i+1));
71+
REQUIRE((mref[i] == static_cast<T>(i+1)));
7272
}
7373

7474
inst.destruct_value(storage, &alloc);

0 commit comments

Comments
 (0)