The previous patch does appear to work but remains technically incorrect.

Please see the attached revised patch ;)

Regards,

Mathieu Trudel-Lapierre <mathieu...@gmail.com>
Freenode: cyphermox, Jabber: mathieu...@gmail.com
4096R/EE018C93 1967 8F7D 03A1 8F38 732E  FF82 C126 33E1 EE01 8C93
From: Mathieu Trudel-Lapierre <mathieu.trudel-lapie...@canonical.com>
Subject: Correctly pass format strings to fltk functions expecting those.
Last-Update: 2011-11-16

Index: bist/src/util.cpp
===================================================================
--- bist.orig/src/util.cpp	2011-11-16 17:32:52.216281000 -0500
+++ bist/src/util.cpp	2011-11-16 17:36:32.684441611 -0500
@@ -1566,7 +1566,7 @@
   string the_choice=string(_("File with name")) + 
     string(_(" ")) + string(the_file) + string(_(" ")) +
     string(_("already exist.\nDo you want to overwrite it?"));
-  return fl_choice(the_choice.c_str(),_("No"),_("Yes"),NULL);
+  return fl_choice("%s",_("No"),_("Yes"),NULL,the_choice.c_str());
     
 }
 
Index: bist/src/immagine.cpp
===================================================================
--- bist.orig/src/immagine.cpp	2011-11-16 17:24:46.086009000 -0500
+++ bist/src/immagine.cpp	2011-11-16 17:39:48.280432894 -0500
@@ -2788,7 +2788,7 @@
       warn +=  _warning[i] + "\n";
     }
     if(warn!=""){
-      fl_alert(warn.c_str());
+      fl_alert("%s",warn.c_str());
     }
   }
   void immagine::print_errors(){
@@ -2797,7 +2797,7 @@
       errori+= _error[i] +"\n";
     }
     if(errori!=""){
-      fl_alert(errori.c_str());
+      fl_alert("%s",errori.c_str());
     }
 
   }
@@ -6276,7 +6276,7 @@
     can_write=1;
   }else{
     if(graphics){
-      fl_message(strerror(errno));
+      fl_message("%s",strerror(errno));
     }else{
       perror(NULL);
     }
Index: bist/src/editor.cpp
===================================================================
--- bist.orig/src/editor.cpp	2011-11-16 17:24:46.086009000 -0500
+++ bist/src/editor.cpp	2011-11-16 17:41:08.872429299 -0500
@@ -394,7 +394,7 @@
 void edit_nowar_cb(Fl_Widget* w, void* v){
   const static char* man="Copyright (C)  2005  Valerio Benfante.\nThis  is  free software; see the file COPYING for copying conditions.\nThere is NO warranty; not even for MERCHANTABILITY or  FITNESS FOR A PARTICULAR PURPOSE.\nThe logo is copyright (C) 2005 Luisa Russo and is released under GNU GPL";
 
-  fl_message(man);
+  fl_message("%s",man);
 }
 
 

Reply via email to