Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:54184 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 74753 invoked from network); 25 Jul 2011 04:34:50 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 25 Jul 2011 04:34:50 -0000 Authentication-Results: pb1.pair.com smtp.mail=gwynne@darkrainfall.org; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=gwynne@darkrainfall.org; sender-id=unknown Received-SPF: error (pb1.pair.com: domain darkrainfall.org from 209.85.161.46 cause and error) X-PHP-List-Original-Sender: gwynne@darkrainfall.org X-Host-Fingerprint: 209.85.161.46 mail-fx0-f46.google.com Received: from [209.85.161.46] ([209.85.161.46:46851] helo=mail-fx0-f46.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 4E/D6-07096-962FC2E4 for ; Mon, 25 Jul 2011 00:34:49 -0400 Received: by fxh19 with SMTP id 19so7907670fxh.19 for ; Sun, 24 Jul 2011 21:34:46 -0700 (PDT) Received: by 10.223.54.20 with SMTP id o20mr6067672fag.27.1311568485453; Sun, 24 Jul 2011 21:34:45 -0700 (PDT) Received: from mail-fx0-f46.google.com (mail-fx0-f46.google.com [209.85.161.46]) by mx.google.com with ESMTPS id 22sm3567477fas.11.2011.07.24.21.34.44 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 24 Jul 2011 21:34:44 -0700 (PDT) Received: by fxh19 with SMTP id 19so7907640fxh.19 for ; Sun, 24 Jul 2011 21:34:44 -0700 (PDT) MIME-Version: 1.0 Received: by 10.223.4.202 with SMTP id 10mr6123291fas.129.1311568484319; Sun, 24 Jul 2011 21:34:44 -0700 (PDT) Received: by 10.223.124.75 with HTTP; Sun, 24 Jul 2011 21:34:44 -0700 (PDT) In-Reply-To: <4E2B57EA.10309@php.net> References: <4E2AF3D4.9070704@daylessday.org> <4E2B57EA.10309@php.net> Date: Mon, 25 Jul 2011 00:34:44 -0400 Message-ID: To: Rasmus Lerdorf Cc: internals@lists.php.net Content-Type: text/plain; charset=UTF-8 Subject: Re: [PHP-DEV] new gcov.php.net machine is up From: gwynne@darkrainfall.org (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 =================================================================== --- Zend/zend_API.h (revision 313656) +++ Zend/zend_API.h (working copy) @@ -96,6 +96,8 @@ #define ZEND_NS_FALIAS(ns, name, alias, arg_info) ZEND_NS_FENTRY(ns, name, ZEND_FN(alias), arg_info, 0) #define ZEND_NS_DEP_FALIAS(ns, name, alias, arg_info) ZEND_NS_FENTRY(ns, name, ZEND_FN(alias), arg_info, ZEND_ACC_DEPRECATED) +#define ZEND_FE_END { NULL, NULL, NULL, 0, 0 } + #define ZEND_ARG_INFO(pass_by_ref, name) { #name, sizeof(#name)-1, NULL, 0, 0, 0, pass_by_ref}, #define ZEND_ARG_PASS_INFO(pass_by_ref) { NULL, 0, NULL, 0, 0, 0, pass_by_ref}, #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 =================================================================== --- main/php.h (revision 313656) +++ main/php.h (working copy) @@ -359,6 +359,7 @@ #define PHP_MALIAS ZEND_MALIAS #define PHP_ABSTRACT_ME ZEND_ABSTRACT_ME #define PHP_ME_MAPPING ZEND_ME_MAPPING +#define PHP_FE_END ZEND_FE_END #define PHP_MODULE_STARTUP_N ZEND_MODULE_STARTUP_N #define PHP_MODULE_SHUTDOWN_N ZEND_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 > >