util-linux/mdev.c:49: warning: 'aliaslink

Denys Vlasenko vda.linux at googlemail.com
Thu May 22 21:35:07 UTC 2008


On Thursday 22 May 2008 23:20, Cristian Ionescu-Idbohrn wrote:
> util-linux/mdev.c: In function 'make_device':
> util-linux/mdev.c:49: warning: 'aliaslink' may be used uninitialized in
> this function
> 
> This seems to fix that:
> 
> Index: util-linux/mdev.c
> ===================================================================
> --- util-linux/mdev.c	(revision 22052)
> +++ util-linux/mdev.c	(working copy)
> @@ -46,7 +46,7 @@
>  	char *dev_maj_min = path + strlen(path);
>  	char *command = NULL;
>  	char *alias = NULL;
> -	int aliaslink;
> +	int aliaslink = 0;
> 
>  	/* Force the configuration file settings exactly. */
>  	umask(0);

Fixed, thanks. Canonical way is to do int aliaslink = aliaslink; -
this avoids emitting useless code.
--
vda



More information about the busybox mailing list