Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:54207 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 91576 invoked from network); 26 Jul 2011 10:54:45 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 26 Jul 2011 10:54:45 -0000 Authentication-Results: pb1.pair.com smtp.mail=rquadling@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=rquadling@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.216.42 as permitted sender) X-PHP-List-Original-Sender: rquadling@gmail.com X-Host-Fingerprint: 209.85.216.42 mail-qw0-f42.google.com Received: from [209.85.216.42] ([209.85.216.42:52093] helo=mail-qw0-f42.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 39/90-18504-3FC9E2E4 for ; Tue, 26 Jul 2011 06:54:44 -0400 Received: by qwi4 with SMTP id 4so157055qwi.29 for ; Tue, 26 Jul 2011 03:54:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:reply-to:in-reply-to:references:from:date:message-id :subject:to:cc:content-type:content-transfer-encoding; bh=FqLMB9gsC8eyvf5WjmzubZttbRRbC+bTVdJ03WWFUbU=; b=gGiNtc1zwud5kXHW1eWJHUdup0EEPxhS2ioaUkE+zjIviI6DIGyQ6aewt4OexMdy2I YE+cTbm48CqMuM2YfKBah12ehrpj4OCsanLjA71xNCk4KqDeJZBIgfUg8Cu00Ol1immE 19B4qhZmmqfubLMm6tdPeG5v4gaSPP+bdkRsA= Received: by 10.229.106.30 with SMTP id v30mr4114475qco.113.1311677681195; Tue, 26 Jul 2011 03:54:41 -0700 (PDT) MIME-Version: 1.0 Received: by 10.229.87.70 with HTTP; Tue, 26 Jul 2011 03:54:21 -0700 (PDT) Reply-To: RQuadling@GMail.com In-Reply-To: References: <4E2AF3D4.9070704@daylessday.org> <4E2B57EA.10309@php.net> Date: Tue, 26 Jul 2011 11:54:21 +0100 Message-ID: To: Gwynne Raskind Cc: Rasmus Lerdorf , internals@lists.php.net Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [PHP-DEV] new gcov.php.net machine is up From: rquadling@gmail.com (Richard Quadling) On 25 July 2011 05:34, Gwynne Raskind wrote: > On this subject, I've been looking into what produces the largest > warnings spam with a decent set of warnings turned on, and I'd like to > recommend this patch. I can't commit it myself (I don't have Zend > karma), nor would I care to without getting some opinion on it. The > patch is against 5.4, but should apply equally to trunk. No API is > changed, and no BC issues are created; it only adds a > forward-compatible optional declarator for the end of a > zend_function_entry struct. Obviously, the spammed warning in question > is "missing initializer", with respect to every function entry struct > in every extension, all of which simply use the {NULL, NULL, NULL} > from ext_skel. The intention is to provide this constant to protect > against future extensions of the structure. There are some other > structures which could also benefit from such an initializer > (smart_str and zend_fcall_info[_cache] come to mind). > > Index: Zend/zend_API.h > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > --- Zend/zend_API.h =C2=A0 =C2=A0 (revision 313656) > +++ Zend/zend_API.h =C2=A0 =C2=A0 (working copy) > @@ -96,6 +96,8 @@ > =C2=A0#define ZEND_NS_FALIAS(ns, name, alias, arg_info) =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0ZEND_NS_FENTRY(ns, > name, ZEND_FN(alias), arg_info, 0) > =C2=A0#define ZEND_NS_DEP_FALIAS(ns, name, alias, > arg_info) =C2=A0 =C2=A0 =C2=A0 ZEND_NS_FENTRY(ns, name, ZEND_FN(alias), a= rg_info, > ZEND_ACC_DEPRECATED) > > +#define ZEND_FE_END =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0{ NULL, NUL= L, NULL, 0, 0 } > + > =C2=A0#define ZEND_ARG_INFO(pass_by_ref, name) =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 { #name, > sizeof(#name)-1, NULL, 0, 0, 0, pass_by_ref}, > =C2=A0#define ZEND_ARG_PASS_INFO(pass_by_ref) =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0{ NULL, 0, NULL, 0, 0, > 0, pass_by_ref}, > =C2=A0#define ZEND_ARG_OBJ_INFO(pass_by_ref, name, classname, allow_null)= { > #name, sizeof(#name)-1, #classname, sizeof(#classname)-1, IS_OBJECT, > allow_null, pass_by_ref}, > Index: main/php.h > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > --- main/php.h =C2=A0(revision 313656) > +++ main/php.h =C2=A0(working copy) > @@ -359,6 +359,7 @@ > =C2=A0#define PHP_MALIAS =C2=A0 =C2=A0 =C2=A0ZEND_MALIAS > =C2=A0#define PHP_ABSTRACT_ME ZEND_ABSTRACT_ME > =C2=A0#define PHP_ME_MAPPING =C2=A0ZEND_ME_MAPPING > +#define PHP_FE_END =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 ZEND_FE_END > > =C2=A0#define PHP_MODULE_STARTUP_N =C2=A0 ZEND_MODULE_STARTUP_N > =C2=A0#define PHP_MODULE_SHUTDOWN_N =C2=A0ZEND_MODULE_SHUTDOWN_N > > -- Gwynne > > > > On Sat, Jul 23, 2011 at 19:23, Rasmus Lerdorf wrote: >> On 07/23/2011 04:07 PM, Gwynne Raskind wrote: >>> Here's my question - if I made some smaller commits here and there to >>> fix warnings in core, would that be accepted? I don't have time to do >>> sweeping changes, but fixing one file today, a couple the next day, >>> etc., is within my abilities (including making sure no regressions are >>> introduced, of course). >> >> That's fine if it is done carefully. Note that the code needs to compile >> on many different platforms, on many different compilers and versions of >> compilers. As there is also ZEND_NS_FE (I'm not seeing a PHP_NS_FE, due to no namespaces in PHP ? I think), should there also be ZEND_NS_FE_END (and for the purist in me PHP_NS_FE and PHP_NS_FE_END). The only extension I've seen using ZEND_NS_FE is https://github.com/lstrojny/functional-php. Richard. --=20 Richard Quadling Twitter : EE : Zend : PHPDoc @RQuadling : e-e.com/M_248814.html : bit.ly/9O8vFY : bit.ly/lFnVea