Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:53731 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 25851 invoked from network); 3 Jul 2011 01:29:53 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 3 Jul 2011 01:29:53 -0000 Authentication-Results: pb1.pair.com smtp.mail=felipensp@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=felipensp@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.210.42 as permitted sender) X-PHP-List-Original-Sender: felipensp@gmail.com X-Host-Fingerprint: 209.85.210.42 mail-pz0-f42.google.com Received: from [209.85.210.42] ([209.85.210.42:58203] helo=mail-pz0-f42.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 7C/B2-29452-F06CF0E4 for ; Sat, 02 Jul 2011 21:29:53 -0400 Received: by pzk37 with SMTP id 37so234477pzk.29 for ; Sat, 02 Jul 2011 18:29:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; bh=5arZiLJvDaiBPuUts4a9hfyR67EJ9+lRWdQqCgQYiUY=; b=bXOSIBhSUf6gSEECUzlISrWxkTWjbKXIT2GYa3i/pW7Hmxvt/Xj8KqbYblffPGfHiF X5rto/Zav7Tslh/nU6JU6G1Rkld/wDdSMk7XfCe1pV8joNc7f6uUNveLBH+MY27ae2Rf csJsPdDc2CmWmAWFICV2U1plYVCLCdp/XAE7s= Received: by 10.143.29.13 with SMTP id g13mr1844043wfj.221.1309656587182; Sat, 02 Jul 2011 18:29:47 -0700 (PDT) MIME-Version: 1.0 Received: by 10.142.222.16 with HTTP; Sat, 2 Jul 2011 18:29:27 -0700 (PDT) In-Reply-To: References: Date: Sat, 2 Jul 2011 22:29:27 -0300 Message-ID: To: =?UTF-8?B?SsOpcsO0bWUgTG95ZXQ=?= Cc: php-dev Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [PHP-DEV] Compilation warning on offsetof in 5.4 and trunk From: felipensp@gmail.com (Felipe Pena) Hi, 2011/7/2 J=C3=A9r=C3=B4me Loyet : > Hi, > > in 5.4 and trunk, there is compilation warnings all pointing to > STD_PHP_INI_ENTRY > > > /home/fat/dev/php-src/trunk/sapi/fpm/fpm/fpm_main.c:1465:109: warning: > cast from pointer to integer of different size > /home/fat/dev/php-src/trunk/sapi/fpm/fpm/fpm_main.c:1466:85: warning: > cast from pointer to integer of different size > > > the warnings appear in sapis (cgi, fpm, ...) and extensions (standard, > ...) and the problem comes from the XOffsetOf macro which is expanded > to offsetof defined in Zend/zend_operators.h whit the following code > added in revisions 311662 and 312264: > > #ifndef offsetof > #define offsetof(t,f) \ > =C2=A0((int)(&((t*)0)->f)) > #endif > > Before this addition, XOffsetOf was expanded to > =C2=A0((long) (((char *) (&(((t*)((void *)0))->f))) - ((char *) ((void *)= 0)))) > > which is defined at the end of main/php.h. > > Two questions: > 1- is this possible to change Zend/zend_operators.h to use the old > macros ? (short term solution) I've removed this offsetof definition introduced in r311662, it seems have been added accidentaly, as the code in this revision do not use it. --=20 Regards, Felipe Pena