From dev-return-1641-archive-asf-public=cust-asf.ponee.io@celix.apache.org Sun Jan 26 10:38:13 2020 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [207.244.88.153]) by mx-eu-01.ponee.io (Postfix) with SMTP id 5FFDF18065C for ; Sun, 26 Jan 2020 11:38:13 +0100 (CET) Received: (qmail 3366 invoked by uid 500); 26 Jan 2020 10:38:12 -0000 Mailing-List: contact dev-help@celix.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@celix.apache.org Delivered-To: mailing list dev@celix.apache.org Received: (qmail 3354 invoked by uid 99); 26 Jan 2020 10:38:12 -0000 Received: from ec2-52-202-80-70.compute-1.amazonaws.com (HELO gitbox.apache.org) (52.202.80.70) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 26 Jan 2020 10:38:12 +0000 From: GitBox To: dev@celix.apache.org Subject: [GitHub] [celix] Oipo commented on a change in pull request #139: Add parsing of version and filter on version when calling useService*. Message-ID: <158003509217.9776.15470503134557571795.gitbox@gitbox.apache.org> References: In-Reply-To: Date: Sun, 26 Jan 2020 10:38:12 -0000 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit 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 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: users@infra.apache.org With regards, Apache Git Services