Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some compiler warnings on ICC #445

Closed
pvleuven opened this issue Oct 20, 2017 · 3 comments
Closed

Some compiler warnings on ICC #445

pvleuven opened this issue Oct 20, 2017 · 3 comments
Milestone

Comments

@pvleuven
Copy link

Hi,

The ICC emits several warnings:

1: Implicit type casting (multiple warnings)
****/cereal.hpp(314): warning #68: integer conversion resulted in a change of sign
return ptrId | detail::msb_32bit;

proposed fix:
I think msb_32bit should be declared as std::uint32_t and not std::int32_t as is the case currently.

2: Hiding member variable
****/cereal/details/polymorphic_impl.hpp(179): warning #3280: declaration hides member "cereal::detail::PolymorphicCasters::map" (declared at line 119)

      for( auto const * map : mapping )

proposed fix:
A rename would do.

3: Missing return statements in rapidjson.

****/cereal/external/rapidjson/document.h(319): warning #1011: missing return statement at end of non-void function "rapidjson::GenericStringRef::operator="
GenericStringRef& operator=(const GenericStringRef& rhs) { s = rhs.s; length = rhs.length; }
^
****/cereal/external/rapidjson/document.h(510): warning #1011: missing return statement at end of non-void function "rapidjson::internal::TypeHelper<ValueType, ValueType::Object>::Set(ValueType &, rapidjson::internal::TypeHelper<ValueType, ValueType::Object>::ObjectType, ValueType::AllocatorType &)"
static ValueType& Set(ValueType& v, ObjectType data, typename ValueType::AllocatorType&) { v = data; }

@AzothAmmo AzothAmmo added this to the v1.2.3 milestone Oct 25, 2017
@AzothAmmo
Copy link
Contributor

I think we have a fix for (1) staged in a PR I need to merge, #423.

(2) I'm surprised isn't caught by -wshadow, but it indeed should be renamed.

(3) There are a few other issues related to rapidjson warnings and this will have to be handled along with those.

AzothAmmo added a commit that referenced this issue Oct 25, 2017
WSoptics pushed a commit to WSoptics/cereal that referenced this issue Mar 15, 2018
@AzothAmmo
Copy link
Contributor

(1) and (2) are both resolved (on develop, soon to be next version).

jrmadsen pushed a commit to jrmadsen/cereal that referenced this issue Jul 7, 2019
jrmadsen pushed a commit to jrmadsen/cereal that referenced this issue Jul 7, 2019
@AzothAmmo
Copy link
Contributor

Hoping (3) is resolved by #579

JerryRyan pushed a commit to JerryRyan/cereal that referenced this issue Jan 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants