Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:54187 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 7088 invoked from network); 25 Jul 2011 10:49:21 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 25 Jul 2011 10:49:21 -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 74.125.83.42 as permitted sender) X-PHP-List-Original-Sender: felipensp@gmail.com X-Host-Fingerprint: 74.125.83.42 mail-gw0-f42.google.com Received: from [74.125.83.42] ([74.125.83.42:65473] helo=mail-gw0-f42.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 21/B1-18696-03A4D2E4 for ; Mon, 25 Jul 2011 06:49:20 -0400 Received: by gwb17 with SMTP id 17so2774039gwb.29 for ; Mon, 25 Jul 2011 03:49:17 -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=7ImYUDjlQDcwSaE/YtkM+TsxJZ081x3LVodN+3SGgLo=; b=mUkfH/+pxvkwZdi5qrYiB/SeDcu4aw7/l+RHL41BPTx8W50k/4/ekBO68vXQV/7U1q uYSREIVmmOUM1N9pCgGPkwwokJNgQguM2rVw52AjNHZC0NHjL6RdvP373qzRiPbW+Xkd s+Q2rvZJ0mjFuU3t8sr+hVYGSoeLbzdrSnT/4= Received: by 10.143.158.8 with SMTP id k8mr2956770wfo.205.1311590957155; Mon, 25 Jul 2011 03:49:17 -0700 (PDT) MIME-Version: 1.0 Received: by 10.142.135.20 with HTTP; Mon, 25 Jul 2011 03:48:57 -0700 (PDT) In-Reply-To: References: <4E2AF3D4.9070704@daylessday.org> <4E2B57EA.10309@php.net> Date: Mon, 25 Jul 2011 07:48:57 -0300 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: felipensp@gmail.com (Felipe Pena) 2011/7/25 Gwynne Raskind : > 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. >> >> -Rasmus >> >> > You're right. Someone already had reported it. I'll work on adding on all extensions. --=20 Regards, Felipe Pena