Re: [PATCH] Clean up struct initalizations
| From: | Marcus Boerger | Date: | Tue, 27 Nov 2007 10:31:43 +0000 |
| Subject: | Re: [PATCH] Clean up struct initalizations | ||
| References: | 1 2 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-33452@lists.php.net to get a copy of this message | ||
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