summaryrefslogtreecommitdiff
path: root/wrapper.c
diff options
context:
space:
mode:
authorRamsay Jones <ramsay@ramsay1.demon.co.uk>2013-10-06 21:50:00 +0100
committerJonathan Nieder <jrnieder@gmail.com>2013-10-14 16:16:00 -0700
commitec145c9c2ef0ddf0ca8b57b968054f4db9de63b3 (patch)
treefd8e7e7c352afb908d6d0802998cf5658e180202 /wrapper.c
parentce1e8462070868bd83f9bc79f90f62d6927f8332 (diff)
downloadgit-ec145c9c2ef0ddf0ca8b57b968054f4db9de63b3.tar.gz
wrapper.c: only define gitmkstemps if needed
When the NO_MKSTEMPS build variable is not set, the gitmkstemps function is dead code. Use a preprocessor conditional to only include the definition when needed. Noticed by sparse. ("'gitmkstemps' was not declared. Should it be static?") Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Diffstat (limited to 'wrapper.c')
-rw-r--r--wrapper.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/wrapper.c b/wrapper.c
index f92b147598..9a6aaafaf3 100644
--- a/wrapper.c
+++ b/wrapper.c
@@ -360,10 +360,12 @@ int git_mkstemp_mode(char *pattern, int mode)
return git_mkstemps_mode(pattern, 0, mode);
}
+#ifdef NO_MKSTEMPS
int gitmkstemps(char *pattern, int suffix_len)
{
return git_mkstemps_mode(pattern, suffix_len, 0600);
}
+#endif
int xmkstemp_mode(char *template, int mode)
{