1
0
mirror of https://github.com/git/git.git synced 2024-10-21 03:28:41 +02:00
git/compat
Johannes Sixt d62c89afb2 compat/mingw.c: remove printf format warning
5096d490 (convert trivial sprintf / strcpy calls to xsnprintf) converted
two sprintf calls. Now GCC warns that "format '%u' expects argument of
type 'unsigned int', but argument 4 has type 'long unsigned int'".
Instead of changing the format string, use a variable of type unsigned
in place of the typedef-ed type DWORD, which hides that it is actually an
unsigned long.

There is no correctness issue with the old code because unsigned long and
unsigned are always of the same size on Windows, even in 64-bit builds.

Signed-off-by: Johannes Sixt <j6t@kdbg.org>
Acked-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-10-23 10:17:53 -07:00
..
nedmalloc prefer memcpy to strcpy 2015-10-05 11:08:05 -07:00
poll poll: honor the timeout on Win32 2015-09-14 12:53:48 -07:00
regex
vcbuild
win32
apple-common-crypto.h
basename.c
bswap.h
fopen.c
gmtime.c
hstrerror.c compat/hstrerror: convert sprintf to snprintf 2015-09-25 10:18:18 -07:00
inet_ntop.c compat/inet_ntop: fix off-by-one in inet_ntop4 2015-09-25 10:18:18 -07:00
inet_pton.c
memmem.c
mingw.c compat/mingw.c: remove printf format warning 2015-10-23 10:17:53 -07:00
mingw.h Merge branch 'nd/untracked-cache' 2015-05-26 13:24:46 -07:00
mkdir.c
mkdtemp.c
mmap.c
msvc.c
msvc.h
obstack.c
obstack.h
pread.c
precompose_utf8.c probe_utf8_pathname_composition: use internal strbuf 2015-10-05 11:06:49 -07:00
precompose_utf8.h probe_utf8_pathname_composition: use internal strbuf 2015-10-05 11:06:49 -07:00
qsort.c
setenv.c
snprintf.c
stat.c
strcasestr.c
strlcpy.c
strtoimax.c
strtoumax.c
terminal.c
terminal.h
unsetenv.c
win32.h
win32mmap.c
winansi.c convert trivial sprintf / strcpy calls to xsnprintf 2015-09-25 10:18:18 -07:00