talons

Fork of Claws Mail https://www.claws-mail
Log | Files | Refs | README | LICENSE

commit f3d84861e4d64dcb7453f9f827883a33e764e6bc
parent 951a0fe24cfbc9be5f7c31ec0eee09a58759409a
Author: Ricardo Mones <ricardo@mones.org>
Date:   Thu,  9 Jul 2015 03:14:56 +0200

Fix build with hardened compiler flags

Error was:
compose.c: In function 'compose_write_to_file':
compose.c:5782:5: error: format not a string literal and no format
arguments [-Werror=format-security]
     alertpanel_error(msg);
     ^
cc1: some warnings being treated as errors
Makefile:1430: recipe for target 'compose.o' failed
make[6]: *** [compose.o] Error 1

Diffstat:
Msrc/compose.c | 4+---
1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/src/compose.c b/src/compose.c @@ -5777,10 +5777,8 @@ static gint compose_write_to_file(Compose *compose, FILE *fp, gint action, gbool if (!privacy_encrypt(compose->privacy_system, mimemsg, compose->encdata)) { debug_print("Couldn't encrypt mime structure: %s.\n", privacy_get_error()); - msg = g_strdup_printf("Couldn't encrypt the email: %s", + alertpanel_error(_("Couldn't encrypt the email: %s"), privacy_get_error()); - alertpanel_error(msg); - g_free(msg); } } }