[U-Boot] [PATCH v3 10/10] mvebu: ds414: Implement Synology specific command set

Phil Sutter phil at nwl.cc
Wed Jan 13 10:42:45 CET 2016


Hi Stefan,

On Wed, Jan 13, 2016 at 09:17:54AM +0100, Stefan Roese wrote:
> I'm preparing a branch for Luka to pull from. With all the pending
> mvebu patches included. And noticed a small issue with this patch.
> See below...
> 
> On 25.12.2015 14:41, Phil Sutter wrote:
[...]
> > +static int do_syno(cmd_tbl_t *cmdtp, int flag,
> > +                   int argc, char * const argv[])
> > +{
> > +	const char *cmd;
> > +	int ret;
> > +
> > +	if (argc < 2)
> > +		goto usage;
> > +
> > +	cmd = argv[1];
> > +	--argc;
> > +	++argv;
> > +
> > +	if (!strcmp(cmd, "populate_env"))
> > +		ret = do_syno_populate(argc, argv);
> > +	else if (!strcmp(cmd, "clk_gate"))
> > +		ret = do_syno_clk_gate(argc, argv);
> > +
> > +	if (ret != -1)
> > +		return ret;
> 
> Here I get this warning:
> 
> board/Synology/common/cmd_syno.c: In function 'do_syno':
> board/Synology/common/cmd_syno.c:216:5: warning: 'ret' may be used uninitialized in this function [-Wmaybe-uninitialized]
>   if (ret != -1)
>      ^
> 
> I've changed this to init ret to 0 in my branch. Let me know if this
> is okay with you.

Yes, sure! I have to admit, I didn't spend much time on this file. It
was always merely for fixing the "real" issues.

Thanks, Phil


More information about the U-Boot mailing list