• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

作図ソフト dia の改良版


Commit MetaInfo

Revisión158e98c34e5e0c622eb0a04f39aeba3c5240c29d (tree)
Tiempo2014-10-02 06:52:08
AutorHans Breuer <hans@breu...>
CommiterHans Breuer

Log Message

[warningectomy] format string is not a string literal (potentially insecure)

dia_xml.c:286:35: warning: format string is not a string literal (potentially insecure) [-Wformat-security]

dia_context_add_message (ctx, error_xml->message);
~

diacairo-print.c:248:20: warning: format string is not a string literal (potentially insecure) [-Wformat-security]

message_error (error->message);
~

xfig-export.c:275:21: warning: format string is not a string literal (potentially insecure) [-Wformat-security]

message_warning(renderer->warnings[warning]);

load_save.c:1255:19: warning: format string is not a string literal (potentially insecure) [-Wformat-security]

message_error (error->message);
~

commands.c:507:35: warning: format string is not a string literal (potentially insecure) [-Wformat-security]

dia_context_add_message (ctx, error->message);
~

Cambiar Resumen

Diferencia incremental

--- a/app/commands.c
+++ b/app/commands.c
@@ -504,7 +504,7 @@ _clipboard_get_data_callback (GtkClipboard *clipboard,
504504 }
505505 }
506506 if (error) {
507- dia_context_add_message (ctx, error->message);
507+ dia_context_add_message (ctx, "%s", error->message);
508508 g_error_free (error);
509509 }
510510 dia_context_release (ctx);
--- a/app/load_save.c
+++ b/app/load_save.c
@@ -1252,7 +1252,7 @@ diagram_autosave(Diagram *dia)
12521252 asi->ctx = dia_context_new (_("Auto save"));
12531253
12541254 if (!g_thread_create (_autosave_in_thread, asi, FALSE, &error)) {
1255- message_error (error->message);
1255+ message_error ("%s", error->message);
12561256 g_error_free (error);
12571257 }
12581258 /* FIXME: need better synchronization */
--- a/lib/dia_xml.c
+++ b/lib/dia_xml.c
@@ -283,7 +283,7 @@ xmlDiaParseFile(const char *filename, DiaContext *ctx)
283283 ret = xmlDoParseFile(filename, &error_xml);
284284 }
285285 if (error_xml)
286- dia_context_add_message (ctx, error_xml->message);
286+ dia_context_add_message (ctx, "%s", error_xml->message);
287287 return ret;
288288 }
289289
--- a/plug-ins/cairo/diacairo-print.c
+++ b/plug-ins/cairo/diacairo-print.c
@@ -245,7 +245,7 @@ cairo_print_callback (DiagramData *data,
245245
246246 res = gtk_print_operation_run (op, GTK_PRINT_OPERATION_ACTION_PRINT_DIALOG, NULL, &error);
247247 if (GTK_PRINT_OPERATION_RESULT_ERROR == res) {
248- message_error (error->message);
248+ message_error ("%s", error->message);
249249 g_error_free (error);
250250 }
251251 return NULL;
--- a/plug-ins/xfig/xfig-export.c
+++ b/plug-ins/xfig/xfig-export.c
@@ -272,7 +272,7 @@ static void
272272 figWarn(XfigRenderer *renderer, int warning)
273273 {
274274 if (renderer->warnings[warning]) {
275- message_warning(renderer->warnings[warning]);
275+ message_warning("%s", renderer->warnings[warning]);
276276 renderer->warnings[warning] = NULL;
277277 }
278278 }