mirror of
https://github.com/git/git
synced 2024-11-05 18:59:29 +00:00
0ed49a3ed9
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. |
||
---|---|---|
.. | ||
xdiff.h | ||
xdiffi.c | ||
xdiffi.h | ||
xemit.c | ||
xemit.h | ||
xinclude.h | ||
xmacros.h | ||
xprepare.c | ||
xprepare.h | ||
xtypes.h | ||
xutils.c | ||
xutils.h |