View Issue Details

IDProjectCategoryView StatusLast Update
0000282Siril[All Projects] Sirilpublic2018-10-27 11:57
ReporterDiamirAssigned Tolock42 
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Product Version0.9.9 
Target Version0.9.10Fixed in Version0.9.10 
Summary0000282: Failed to build svn 2527, missing format in src/gui/message_dialog.c
DescriptionHi,

I got the following error (a warning in fact but critical IMO).

gui/message_dialog.c: In function 'siril_confirm_dialog':
gui/message_dialog.c:94:4: error: format not a string literal and no format arguments [-Werror=format-security]
    GTK_MESSAGE_QUESTION, GTK_BUTTONS_OK_CANCEL, title);
    ^~~~~~~~~~~~~~~~~~~~
gui/message_dialog.c:95:2: error: format not a string literal and no format arguments [-Werror=format-security]
  gtk_message_dialog_format_secondary_text(GTK_MESSAGE_DIALOG(dialog), msg);
  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
make[2]: *** [Makefile:894: gui/message_dialog.o] Error 1

Patch attached

Regards

Jean-Luc
TagsNo tags attached.

Activities

Diamir

2018-10-27 10:44

reporter  

gtk_message.patch (785 bytes)
diff -ruN orig/src/gui/message_dialog.c new/src/gui/message_dialog.c
--- orig/src/gui/message_dialog.c	2018-10-27 10:28:02.976534383 +0200
+++ new/src/gui/message_dialog.c	2018-10-27 10:27:03.752963095 +0200
@@ -91,8 +91,8 @@
 	strip_last_ret_char(msg);
 
 	dialog = gtk_message_dialog_new(parent, GTK_DIALOG_MODAL,
-			GTK_MESSAGE_QUESTION, GTK_BUTTONS_OK_CANCEL, title);
-	gtk_message_dialog_format_secondary_text(GTK_MESSAGE_DIALOG(dialog), msg);
+			GTK_MESSAGE_QUESTION, GTK_BUTTONS_OK_CANCEL, "%s", title);
+	gtk_message_dialog_format_secondary_text(GTK_MESSAGE_DIALOG(dialog), "%s", msg);
 	if (show_checkbutton) {
 		check = gtk_check_button_new_with_mnemonic(_("_Do not show this dialog again"));
 		gtk_box_pack_end(GTK_BOX(gtk_dialog_get_content_area(GTK_DIALOG (dialog))),
gtk_message.patch (785 bytes)

lock42

2018-10-27 11:56

administrator   ~0000608

Fix committed to Siril (2528).

lock42

2018-10-27 11:57

administrator   ~0000609

Thank you.

Related Changesets

Siril: 0.9 r2528

2018-10-27 11:56:43

lock42

Details
Fix 0000282 Affected Issues
0000282
mod - /branches/0.9/src/gui/message_dialog.c

Issue History

Date Modified Username Field Change
2018-10-27 10:44 Diamir New Issue
2018-10-27 10:44 Diamir File Added: gtk_message.patch
2018-10-27 11:56 lock42 Changeset attached => Siril 0.9 r2528
2018-10-27 11:56 lock42 Note Added: 0000608
2018-10-27 11:56 lock42 Assigned To => lock42
2018-10-27 11:56 lock42 Status new => resolved
2018-10-27 11:56 lock42 Resolution open => fixed
2018-10-27 11:57 lock42 Fixed in Version => 0.9.10
2018-10-27 11:57 lock42 Target Version => 0.9.10
2018-10-27 11:57 lock42 Note Added: 0000609