version-gen: cleanup

No functional changes.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
version-gen: fix versions

Virtually all packaging guidelines would prefer 1.8.4~rc1, over
1.8.4.rc1 or 1.8.4-rc1, so it makes sense to use that instead.

In particular, the only packaging we provide, git.spec, generates a
wrong version, because git-1.8.4 < git-1.8.4.rc1, changing to ~rc1 fixes
the problem as it's considered newer.

The same happens in dpkg.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Revert "make error()'s constant return value more visible"

In recent versions of gcc (4.9.0), we get hundreds of these:

  advice.c: In function ‘error_resolve_conflict’:
  advice.c:79:69: warning: right-hand operand of comma expression has no effect [-Wunused-value]
    error("'%s' is not possible because you have unmerged files.", me);
                                                                     ^
The original patch intended to help in situations like this:

  if (error(...))
    /* do stuff */

However, when there's no conditional statement this gets translated to:

  (error(..), 1);

And the right hand of the expression has no effect.

So it looks like gcc is smarter now, and in trying to fix a few warnings
we generated hundreds more.

This reverts commit e208f9cc7574f5980faba498d0aa30b4defeb34f.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>

Conflicts:
	git-compat-util.h
Revert "silence some -Wuninitialized false positives"

In recent versions of gcc (4.9.0), we get a few of these:

  notes.c: In function ‘notes_display_config’:
  notes.c:970:28: warning: right-hand operand of comma expression has no effect [-Wunused-value]
      config_error_nonbool(k);
                            ^
Previous commit explains the reason.

This reverts commit a469a1019352b8efc4bd7003b0bd59eb60fc428c.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>

Conflicts:
	cache.h
	parse-options.h
Silence a bunch of format-zero-length warnings

This is in gcc 4.9.0:

  wt-status.c: In function ‘wt_status_print_unmerged_header’:
  wt-status.c:191:2: warning: zero-length gnu_printf format string [-Wformat-zero-length]
    status_printf_ln(s, c, "");
    ^

We could pass -Wno-format-zero-length, but it seems compiler-specific
flags are frowned upon, so let's just avoid the warning altogether.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Silence gcc warnings with -O3

Commit a469a10 (silence some -Wuninitialized false positives) tried to
silence some uninitialized false-positives with a hack. This hack
triggered many more warnings on clang, and eventually gcc 4.9.0 as well.

While more hacks can be used to silence the new warnings, it's much
better to decouple ourselves from such hacks and help the compilers
directly.

We can do that by either initializing the variables, or manually
returning the error value (-1) without depending on error() to do it.

This fixes warnings while compiling with gcc -O3.

  parse-options.c: In function ‘get_value’:
  parse-options.c:183:24: warning: ‘arg’ may be used uninitialized in this function [-Wmaybe-uninitialized]
     *(int *)opt->value = strtol(arg, (char **)&s, 10);
			  ^
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>