From d257ecb4f599169335dfe0ee1d2af975677ff4ce Mon Sep 17 00:00:00 2001 From: "fergus.henderson" Date: Tue, 2 Mar 2010 08:13:44 +0000 Subject: Apply patch from Akim Demaille : * src/emaillog.c (dcc_maybe_send_email): Pacify GCC's warnings about format strings by getting rid of a useless temporary string. git-svn-id: http://distcc.googlecode.com/svn/trunk@716 01de4be4-8c4a-0410-9132-4925637da917 --- src/emaillog.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/emaillog.c b/src/emaillog.c index e896ebe..9e68a0b 100644 --- a/src/emaillog.c +++ b/src/emaillog.c @@ -1,6 +1,6 @@ /* -*- c-file-style: "java"; indent-tabs-mode: nil; tab-width: 4; fill-column: 78 -*- * - * Copyright 2007 Google Inc. + * Copyright 2007, 2009 Google Inc. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -112,18 +112,14 @@ void dcc_maybe_send_email(void) { == NULL) { whom_to_blame = dcc_emaillog_whom_to_blame; } - char *will_send_message_to; char *cant_send_message_to; if (should_send_email == 0) return; if (never_send_email) return; - asprintf(&will_send_message_to, will_send_message_format, whom_to_blame); + rs_log_warning(will_send_message_format, whom_to_blame); asprintf(&cant_send_message_to, cant_send_message_format, whom_to_blame); - rs_log_warning(will_send_message_to); - free(will_send_message_to); - if (email_fileno < 0) { errno = email_errno; perror(cant_send_message_to); -- cgit v1.2.1