Return-Path: X-Original-To: apmail-cordova-issues-archive@minotaur.apache.org Delivered-To: apmail-cordova-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id BE029182E8 for ; Wed, 28 Oct 2015 18:22:34 +0000 (UTC) Received: (qmail 10488 invoked by uid 500); 28 Oct 2015 18:22:28 -0000 Delivered-To: apmail-cordova-issues-archive@cordova.apache.org Received: (qmail 10096 invoked by uid 500); 28 Oct 2015 18:22:28 -0000 Mailing-List: contact issues-help@cordova.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list issues@cordova.apache.org Received: (qmail 9943 invoked by uid 99); 28 Oct 2015 18:22:28 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 28 Oct 2015 18:22:28 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 0B0402C1F5A for ; Wed, 28 Oct 2015 18:22:28 +0000 (UTC) Date: Wed, 28 Oct 2015 18:22:28 +0000 (UTC) From: "Perry Stoll (JIRA)" To: issues@cordova.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (CB-9702) Fix plugin initialization based on XCode 7.0 compiler warnings MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/CB-9702?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14978954#comment-14978954 ] Perry Stoll commented on CB-9702: --------------------------------- Jose, I suspect this change has not been released yet. It is not fatal, it is just a warning. And the stated behavior (those condition evaluations being true) is safe in this case. But this cleanup was a reminder - never ignore compiler warnings! Perry > Fix plugin initialization based on XCode 7.0 compiler warnings > -------------------------------------------------------------- > > Key: CB-9702 > URL: https://issues.apache.org/jira/browse/CB-9702 > Project: Apache Cordova > Issue Type: Bug > Components: Plugin Network Information > Affects Versions: Master > Environment: XCode Version 7.0 (7A220) > Reporter: Perry Stoll > > xcode complains "These will always evaluate to true", which, looking at these lines, makes sense. These things are objects, taking their address will always yield a non-null value. > {code} > cordova-plugin-network-information pstoll$ git diff > diff --git a/src/ios/CDVConnection.m b/src/ios/CDVConnection.m > index 3749767..223dd7c 100644 > --- a/src/ios/CDVConnection.m > +++ b/src/ios/CDVConnection.m > @@ -118,7 +118,7 @@ > [self.internetReach startNotifier]; > [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(updateConnectionType:) > name:kReachabilityChangedNotification object:nil]; > - if (&UIApplicationDidEnterBackgroundNotification && &UIApplicationWillEnterForegroundNotification) { > + if (UIApplicationDidEnterBackgroundNotification && UIApplicationWillEnterForegroundNotification) { > [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(onPause) name:UIApplicationDidEnterBackgroundNotification object:nil]; > [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(onResume) name:UIApplicationWillEnterForegroundNotification object:nil]; > } > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org For additional commands, e-mail: issues-help@cordova.apache.org