git/xdiff
Marco Roeland 0ed49a3ed9 xdiff/xdiffi.c: fix warnings about possibly uninitialized variables
Compiling this module gave the following warnings (some double dutch!):

xdiff/xdiffi.c: In functie 'xdl_recs_cmp':
xdiff/xdiffi.c:298: let op: 'spl.i1' may be used uninitialized in this function
xdiff/xdiffi.c:298: let op: 'spl.i2' may be used uninitialized in this function
xdiff/xdiffi.c:219: let op: 'fbest1' may be used uninitialized in this function
xdiff/xdiffi.c:219: let op: 'bbest1' may be used uninitialized in this function

A superficial tracking of their usage, without deeper knowledge about the
algorithm, indeed confirms that there are code paths on which these
variables will be used uninitialized. In practice these code paths might never
be reached, but then these fixes will not change the algorithm. If these
code paths are ever reached we now at least have a predictable outcome. And
should the very small performance impact of these initializations be
noticeable, then they should at least be replaced by comments why certain
code paths will never be reached.

Some extra initializations in this patch now fix the warnings.
2006-04-08 23:35:22 -07:00
..
xdiff.h xdiff: Show function names in hunk headers. 2006-03-27 18:43:51 -08:00
xdiffi.c xdiff/xdiffi.c: fix warnings about possibly uninitialized variables 2006-04-08 23:35:22 -07:00
xdiffi.h Use a *real* built-in diff generator 2006-03-25 16:49:58 -08:00
xemit.c xdiff: Show function names in hunk headers. 2006-03-27 18:43:51 -08:00
xemit.h Use a *real* built-in diff generator 2006-03-25 16:49:58 -08:00
xinclude.h xdiff: Show function names in hunk headers. 2006-03-27 18:43:51 -08:00
xmacros.h Use a *real* built-in diff generator 2006-03-25 16:49:58 -08:00
xprepare.c Clean-up trivially redundant diff. 2006-04-04 00:11:09 -07:00
xprepare.h Use a *real* built-in diff generator 2006-03-25 16:49:58 -08:00
xtypes.h Use a *real* built-in diff generator 2006-03-25 16:49:58 -08:00
xutils.c Clean-up trivially redundant diff. 2006-04-04 00:11:09 -07:00
xutils.h Clean-up trivially redundant diff. 2006-04-04 00:11:09 -07:00