Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:33452 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 53729 invoked by uid 1010); 27 Nov 2007 10:31:50 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 53714 invoked from network); 27 Nov 2007 10:31:50 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 27 Nov 2007 10:31:50 -0000 Authentication-Results: pb1.pair.com smtp.mail=helly@php.net; spf=unknown; sender-id=unknown Authentication-Results: pb1.pair.com header.from=helly@php.net; sender-id=unknown Received-SPF: unknown (pb1.pair.com: domain php.net does not designate 85.214.94.56 as permitted sender) X-PHP-List-Original-Sender: helly@php.net X-Host-Fingerprint: 85.214.94.56 aixcept.net Linux 2.6 Received: from [85.214.94.56] ([85.214.94.56:38677] helo=h1149922.serverkompetenz.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id CB/74-24478-312FB474 for ; Tue, 27 Nov 2007 05:31:49 -0500 Received: from dhcp-172-28-204-176.zrh.corp.google.com (unknown [193.142.125.1]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by h1149922.serverkompetenz.net (Postfix) with ESMTP id 9703E1B3552; Tue, 27 Nov 2007 11:31:44 +0100 (CET) Date: Tue, 27 Nov 2007 11:31:43 +0100 Reply-To: Marcus Boerger X-Priority: 3 (Normal) Message-ID: <1683048725.20071127113143@marcus-boerger.de> To: Stanislav Malyshev CC: Andy Lester , internals@lists.php.net In-Reply-To: <474BDAF8.6020308@zend.com> References: <20071127074757.GA25945@petdance.com> <474BDAF8.6020308@zend.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] [PATCH] Clean up struct initalizations From: helly@php.net (Marcus Boerger) Hello Stanislav, a global struct is filled up with NULL/0's while a local struct is not initialized at all. The patch simply provides more correct code and even adds a few consts. I think we should apply this to 5.3 and HEAD. Meaning we need it for both versions. marcus Tuesday, November 27, 2007, 9:53:12 AM, you wrote: >> I've been working on making PHP build under more stringent error >> checking, specifically -Wextra under GCC. This patch cleans up dozens >> of struct initializations that are valid C, but could hide future >> problems. > Doesn't C standard mandate filling up uninitialized fields with 0? > -- > Stanislav Malyshev, Zend Software Architect > stas@zend.com http://www.zend.com/ > (408)253-8829 MSN: stas@zend.com Best regards, Marcus