Skip to content

Commit 10b7f7a

Browse files
committed
Compiling with pedantic on
see issue #17
1 parent f27eb02 commit 10b7f7a

File tree

12 files changed

+31
-31
lines changed

12 files changed

+31
-31
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
CPPFLAGS=-std=c++11 -I./include -Wall -Werror -g -Wextra -Wshadow
1+
CPPFLAGS=-std=c++11 -I./include -Wall -Werror -g -Wextra -Wshadow -pedantic
22
CXX=g++
33
COVERAGE_OUTPUT=out
44

include/cereal/archives/binary.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ namespace cereal
148148
} // namespace cereal
149149

150150
// register archives for polymorphic support
151-
CEREAL_REGISTER_ARCHIVE(cereal::BinaryOutputArchive);
152-
CEREAL_REGISTER_ARCHIVE(cereal::BinaryInputArchive);
151+
CEREAL_REGISTER_ARCHIVE(cereal::BinaryOutputArchive)
152+
CEREAL_REGISTER_ARCHIVE(cereal::BinaryInputArchive)
153153

154154
#endif // CEREAL_ARCHIVES_BINARY_HPP_

include/cereal/archives/json.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -765,7 +765,7 @@ namespace cereal
765765
} // namespace cereal
766766

767767
// register archives for polymorphic support
768-
CEREAL_REGISTER_ARCHIVE(cereal::JSONInputArchive);
769-
CEREAL_REGISTER_ARCHIVE(cereal::JSONOutputArchive);
768+
CEREAL_REGISTER_ARCHIVE(cereal::JSONInputArchive)
769+
CEREAL_REGISTER_ARCHIVE(cereal::JSONOutputArchive)
770770

771771
#endif // CEREAL_ARCHIVES_JSON_HPP_

include/cereal/archives/portable_binary.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ namespace cereal
228228
} // namespace cereal
229229

230230
// register archives for polymorphic support
231-
CEREAL_REGISTER_ARCHIVE(cereal::PortableBinaryOutputArchive);
232-
CEREAL_REGISTER_ARCHIVE(cereal::PortableBinaryInputArchive);
231+
CEREAL_REGISTER_ARCHIVE(cereal::PortableBinaryOutputArchive)
232+
CEREAL_REGISTER_ARCHIVE(cereal::PortableBinaryInputArchive)
233233

234234
#endif // CEREAL_ARCHIVES_PORTABLE_BINARY_HPP_

include/cereal/archives/xml.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -778,7 +778,7 @@ namespace cereal
778778
} // namespace cereal
779779

780780
// register archives for polymorphic support
781-
CEREAL_REGISTER_ARCHIVE(cereal::XMLOutputArchive);
782-
CEREAL_REGISTER_ARCHIVE(cereal::XMLInputArchive);
781+
CEREAL_REGISTER_ARCHIVE(cereal::XMLOutputArchive)
782+
CEREAL_REGISTER_ARCHIVE(cereal::XMLInputArchive)
783783

784784
#endif // CEREAL_ARCHIVES_XML_HPP_

include/cereal/details/polymorphic_impl.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -340,7 +340,7 @@ namespace cereal
340340
341341
See the documentation for the other functions to try and understand this */
342342
template <class T>
343-
void instantiate_polymorphic_binding( T*, int, adl_tag ) {};
343+
void instantiate_polymorphic_binding( T*, int, adl_tag ) {}
344344
} // namespace detail
345345
} // namespace cereal
346346

include/cereal/details/traits.hpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ namespace cereal
6060
}; \
6161
} /* end namespace detail */ \
6262
template <class T, class A> \
63-
struct has_member_##name : std::integral_constant<bool, detail::has_member_##name##_impl<T, A>::value> {};
63+
struct has_member_##name : std::integral_constant<bool, detail::has_member_##name##_impl<T, A>::value> {}
6464

6565
//! Creates a test for whether a non const non-member function exists
6666
/*! This creates a class derived from std::integral_constant that will be true if
@@ -79,7 +79,7 @@ namespace cereal
7979
}; \
8080
} /* end namespace detail */ \
8181
template <class T, class A> \
82-
struct has_non_member_##name : std::integral_constant<bool, detail::has_non_member_##name##_impl<T, A>::value> {};
82+
struct has_non_member_##name : std::integral_constant<bool, detail::has_non_member_##name##_impl<T, A>::value> {}
8383

8484
//! Creates a test for whether a non const member function exists with a version parameter
8585
/*! This creates a class derived from std::integral_constant that will be true if
@@ -98,7 +98,7 @@ namespace cereal
9898
}; \
9999
} /* end namespace detail */ \
100100
template <class T, class A> \
101-
struct has_member_versioned_##name : std::integral_constant<bool, detail::has_member_versioned_##name##_impl<T, A>::value> {};
101+
struct has_member_versioned_##name : std::integral_constant<bool, detail::has_member_versioned_##name##_impl<T, A>::value> {}
102102

103103
//! Creates a test for whether a non const non-member function exists with a version parameter
104104
/*! This creates a class derived from std::integral_constant that will be true if
@@ -117,7 +117,7 @@ namespace cereal
117117
}; \
118118
} /* end namespace detail */ \
119119
template <class T, class A> \
120-
struct has_non_member_versioned_##name : std::integral_constant<bool, detail::has_non_member_versioned_##name##_impl<T, A>::value> {};
120+
struct has_non_member_versioned_##name : std::integral_constant<bool, detail::has_non_member_versioned_##name##_impl<T, A>::value> {}
121121

122122
// ######################################################################
123123
// Member load_and_allocate

include/cereal/types/polymorphic.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@
6868
static CONSTEXPR char const * name() { return #T; }; \
6969
}; \
7070
} } /* end namespaces */ \
71-
CEREAL_BIND_TO_ARCHIVES(T);
71+
CEREAL_BIND_TO_ARCHIVES(T)
7272

7373
//! Registers a polymorphic type with cereal, giving it a
7474
//! user defined name
@@ -83,7 +83,7 @@
8383
struct binding_name<T> \
8484
{ static CONSTEXPR char const * name() { return Name; }; }; \
8585
} } /* end namespaces */ \
86-
CEREAL_BIND_TO_ARCHIVES(T);
86+
CEREAL_BIND_TO_ARCHIVES(T)
8787

8888
namespace cereal
8989
{

performance.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,7 @@ struct PoDStructCereal
289289
void serialize( Archive & ar )
290290
{
291291
ar(a, b, c, d);
292-
};
292+
}
293293
};
294294

295295
struct PoDStructBoost
@@ -303,7 +303,7 @@ struct PoDStructBoost
303303
void serialize( Archive & ar, const unsigned int /*version*/ )
304304
{
305305
ar & a & b & c & d;
306-
};
306+
}
307307
};
308308

309309
struct PoDChildCereal : virtual PoDStructCereal
@@ -317,7 +317,7 @@ struct PoDChildCereal : virtual PoDStructCereal
317317
void serialize( Archive & ar )
318318
{
319319
ar( cereal::virtual_base_class<PoDStructCereal>(this), v );
320-
};
320+
}
321321
};
322322

323323
struct PoDChildBoost : virtual PoDStructBoost
@@ -332,7 +332,7 @@ struct PoDChildBoost : virtual PoDStructBoost
332332
{
333333
ar & boost::serialization::base_object<PoDStructBoost>(*this);
334334
ar & v;
335-
};
335+
}
336336
};
337337

338338
int main()

sandbox.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ namespace cereal
104104
template <class Archive> struct specialize<Archive, Derived, cereal::specialization::member_load_save> {};
105105
}
106106

107-
CEREAL_REGISTER_TYPE(Derived);
107+
CEREAL_REGISTER_TYPE(Derived)
108108

109109
// ###################################
110110
struct Test1
@@ -235,7 +235,7 @@ struct EmptyStruct
235235
void serialize(Archive &)
236236
{
237237
std::cout << "Side effects!" << std::endl;
238-
};
238+
}
239239
};
240240

241241
struct NonEmptyStruct
@@ -776,7 +776,7 @@ int main()
776776
return 0;
777777
}
778778

779-
CEREAL_CLASS_VERSION(BoostTransitionMS, 1);
780-
CEREAL_CLASS_VERSION(BoostTransitionSplit, 2);
781-
CEREAL_CLASS_VERSION(BoostTransitionNMS, 3);
779+
CEREAL_CLASS_VERSION(BoostTransitionMS, 1)
780+
CEREAL_CLASS_VERSION(BoostTransitionSplit, 2)
781+
CEREAL_CLASS_VERSION(BoostTransitionNMS, 3)
782782
// keep the other at default version (0)

sandbox_rtti.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ struct MyType : public Base
7373
ar( cereal::base_class<Base>( this ) );
7474
}
7575
};
76-
CEREAL_REGISTER_TYPE(MyType);
76+
CEREAL_REGISTER_TYPE(MyType)
7777

7878
struct YourType : public Base
7979
{
@@ -97,7 +97,7 @@ struct YourType : public Base
9797
ar( x );
9898
}
9999
};
100-
CEREAL_REGISTER_TYPE(YourType);
100+
CEREAL_REGISTER_TYPE(YourType)
101101

102102
struct OurBase
103103
{
@@ -159,7 +159,7 @@ struct TestType
159159
void serialize( Archive & ar )
160160
{
161161
ar( x );
162-
};
162+
}
163163
};
164164

165165
namespace cereal
@@ -180,7 +180,7 @@ struct BBB : AAA
180180
void serialize( Archive & ) {}
181181
};
182182

183-
CEREAL_REGISTER_TYPE(BBB);
183+
CEREAL_REGISTER_TYPE(BBB)
184184

185185
template <class T> void nop(T&&) {}
186186

@@ -202,7 +202,7 @@ int main()
202202
//oarchive(ptr3);
203203
//oarchive(ptr4);
204204
//oarchive(ptr5);
205-
205+
206206

207207
//std::shared_ptr<AAA> a = std::make_shared<BBB>();
208208
//oarchive(a);

unittests.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2816,7 +2816,7 @@ std::ostream& operator<<(std::ostream& os, PolyDerived const & s)
28162816
return os;
28172817
}
28182818

2819-
CEREAL_REGISTER_TYPE(PolyDerived);
2819+
CEREAL_REGISTER_TYPE(PolyDerived)
28202820

28212821
template <class IArchive, class OArchive>
28222822
void test_polymorphic()

0 commit comments

Comments
 (0)