Oipo commented on a change in pull request #139: Add parsing of version and
filter on version when calling useService*.
URL: https://github.com/apache/celix/pull/139#discussion_r370988766
##########
File path: libs/framework/tst/bundle_context_services_test.cpp
##########
@@ -87,7 +87,7 @@ TEST(CelixBundleContextServicesTests,
registerMultipleAndUseServices) {
};
const char *calcName = "calc";
- struct calc svc;
+ struct calc svc{};
Review comment:
So the error is actually an error of the g++ 4.x and 5.x series. The warning
is used to indicate class types that are improperly initialized. Since c++11,
empty initialization means [zero initialization for non-union class
types](https://en.cppreference.com/w/cpp/language/zero_initialization) (as is
the case here). As this does not lead to half-initialized class types, there is
no reason to give a warning. Therefore, since version 6.1
([godbolt](https://godbolt.org/z/T6yuJD)), g++ includes the following exception
for this warning:
`in C++ this option does not warn about the empty { } initializer`
[[docs]](https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html)
As it is a hassle to not apply this rule for these few instances, because it
is test code and every time the calc field is properly filled, I will simply
revert the changes here.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services