[PATCH] clean up compiler warnings in 2.5 bk

Paul Mackerras paulus at samba.org
Thu Nov 13 22:43:15 EST 2003


Nathan Lynch writes:

> Attached patch cleans up some warnings I've seen when building ameslab
> 2.5 bk:

> -} hmt_thread_data[NR_CPUS] = {0};
> +} hmt_thread_data[NR_CPUS] = {{0}};

I guess this is because we don't initialize the bss early enough.
Apart from that I'd rather see the initializer disappear.

> -        if (np->node != NULL) {
> +        if (np->node) {

Why do you consider the + version to be better?  I prefer the != NULL
form myself.  If the compiler is warning about that then the compiler
is broken and we should get it fixed.

> +extern unsigned long _get_PIR(void);

> +#ifdef CONFIG_PROC_DEVICETREE
> +struct device_node;
>  extern void proc_device_tree_init(void);
>  extern void proc_device_tree_add_node(struct device_node *, struct proc_dir_entry *);
> +#endif /* CONFIG_PROC_DEVICETREE */

These changes look fine.

Paul.

** Sent via the linuxppc64-dev mail list. See http://lists.linuxppc.org/





More information about the Linuxppc64-dev mailing list