Source-Changes-D archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: CVS commit: src/usr.bin/make



On Mon, 12 Oct 2015 16:48:13 +0000
"Simon J. Gerraty" <sjg%netbsd.org@localhost> wrote:

> Module Name:	src
> Committed By:	sjg
> Date:		Mon Oct 12 16:48:13 UTC 2015
> 
> Modified Files:
> 	src/usr.bin/make: var.c
> 
> Log Message:
> The conditional expressions used with ':?' can be expensive
> eg. exists() does stat(2).
> If 'wantit' is FALSE, we are going to discard everything anyway,
> so skip evaluating the conditional and expanding either lhs or rhs.

/work/src/usr.bin/make/var.c:2772:7: error: variable 'emsg' is used uninitialized whenever 'if' condition is false [-Werror,-Wsometimes-uninitialized]
  if (wantit)
/work/src/usr.bin/make/var.c:2777:7: note: uninitialized use occurs here
  if (emsg)
/work/src/usr.bin/make/var.c:2772:3: note: remove the 'if' if its condition is always true
  if (wantit)
/work/src/usr.bin/make/var.c:2760:19: note: initialize the variable 'emsg' to silence this warning
  const char *emsg;
1 error generated.


Home | Main Index | Thread Index | Old Index