Revision a6253d107734c7ffa6d939307d87cf496795dc78 authored by Junio C Hamano on 25 May 2011, 19:23:44 UTC, committed by Junio C Hamano on 25 May 2011, 20:08:10 UTC
This function was introduced in 5b16360 (pretty: Initialize notes if %N is
used, 2010-04-13) to check what kind of information the "log --format=..."
user format string wants. The function can be passed a NULL instead of a
format string to ask it to check user_format variable kept by an earlier
call to save_user_format().

But it unconditionally checked user_format and not the string it was
given.  The only caller introduced by the change passes NULL, which
kept the bug unnoticed, until a new GCC noticed that there is an
assignment to fmt that is never used.

Noticed-by: Chris Wilson's compiler
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Acked-by: Jeff King <peff@peff.net>
1 parent 9963e02
History
File Mode Size
xdiff.h -rw-r--r-- 3.4 KB
xdiffi.c -rw-r--r-- 14.6 KB
xdiffi.h -rw-r--r-- 1.8 KB
xemit.c -rw-r--r-- 4.9 KB
xemit.h -rw-r--r-- 1.2 KB
xinclude.h -rw-r--r-- 1.2 KB
xmacros.h -rw-r--r-- 1.9 KB
xmerge.c -rw-r--r-- 15.1 KB
xpatience.c -rw-r--r-- 10.7 KB
xprepare.c -rw-r--r-- 11.2 KB
xprepare.h -rw-r--r-- 1.1 KB
xtypes.h -rw-r--r-- 1.6 KB
xutils.c -rw-r--r-- 8.1 KB
xutils.h -rw-r--r-- 1.7 KB

back to top