Re: [PATCH 2/2] mmc: fix integer assignments to pointer

Chris Ball
2011-08-23T18:28:57Z

Hi,

On Tue, Aug 23 2011, Josh Triplett wrote:
> {} produces the same effect, as far as I know.

Yeah. I prefer {0}, because {} is a gcc-ism (the ANSI grammar demands
initializer-lists be non-empty) and is less readable for people who
haven't seen the idiom before and are wondering what's going on.

I'm still a little confused -- the {0} or memset(0, struct ..);
formations are used often in the kernel, even with pointers involved.
Is the warning (Wnon_pointer_null) run against the kernel by default,
or did Venkatraman add it manually? If default, is it catching bugs?

Thanks,

- Chris.
--
Chris Ball <cjb@laptop.org> <http://printf.net/>
One Laptop Per Child