Skip to content

Commit

Permalink
ident.c: replace fprintf with fputs to suppress compiler warning
Browse files Browse the repository at this point in the history
Compiling today's pu gave
    ...
    CC ident.o
    CC levenshtein.o
ident.c: In function 'fmt_ident':
ident.c:206: warning: format not a string literal and no format arguments
    CC list-objects.o
    ...

This warning seems to have appeared first in 18e95f2 (ident.c:
remove unused variables) which removed additional fprintf arguments.

Suppress this warning by using fputs instead of fprintf.

Signed-off-by: Tarmigan Casebolt <tarmigan+git@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Tarmigan Casebolt authored and Junio C Hamano committed Jan 19, 2010
1 parent 5aeb3a3 commit 8b770a2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ident.c
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ const char *fmt_ident(const char *name, const char *email,

if ((warn_on_no_name || error_on_no_name) &&
name == git_default_name && env_hint) {
fprintf(stderr, env_hint);
fputs(env_hint, stderr);
env_hint = NULL; /* warn only once */
}
if (error_on_no_name)
Expand Down

0 comments on commit 8b770a2

Please sign in to comment.