Files
git/builtin
Johannes Schindelin 5d38ed8a57 Really work around "uninitialized value" warning
Ever since 457f08a (git-rev-list: add --bisect-vars option.,
2007-03-21), Git's source code uses the following trick to fool GCC into
*not* warning about uninitialized values:

	int value = value;

We use this trick to silence the "warning: ‘x’ is used uninitialized in
this function [-Wuninitialized]" when the variables are not really used
uninitialized (but it is hard for the compiler to determine that).

This trick works well for GCC, and even Clang seems to appease that
workaround.

Not so Visual C. It does realize that this is just a trick to fool it,
and it simply refuses to be fooled.

The only way to silence the warning for Visual C would be to write
something like this:

	#pragma warning(suppress: 4700)
	int value;

Obviously this is not portable, and neither is that trick that fools
GCC. So let's just introduce a new macro that continues to fool GCC, but
simply initializes the values everywhere else.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2018-03-23 13:54:04 +01:00
..
2017-11-27 11:06:37 +09:00
2017-10-06 10:07:18 +09:00
2017-12-27 11:16:25 -08:00
2018-03-23 13:52:05 +01:00
2017-11-18 12:31:29 +09:00
2017-10-07 16:27:55 +09:00
2017-09-25 15:24:07 +09:00
2017-11-21 14:07:50 +09:00
2017-12-27 11:16:29 -08:00
2017-08-26 22:55:09 -07:00
2017-12-06 09:23:39 -08:00
2017-12-13 13:28:54 -08:00
2017-12-06 09:23:44 -08:00
2017-11-18 12:31:29 +09:00
2017-12-27 11:16:29 -08:00
2017-08-22 10:29:03 -07:00
2017-12-27 11:16:29 -08:00
2017-11-06 14:24:27 +09:00
2017-11-21 14:07:50 +09:00