[ochusha] Support -Werror=format-string

Mamoru TASAKA mtasaka at fedoraproject.org
Tue Dec 3 08:56:13 UTC 2013


commit a9a1f850df198323678045f153a3b4df64632ea6
Author: Mamoru TASAKA <mtasaka at fedoraproject.org>
Date:   Tue Dec 3 17:56:05 2013 +0900

    Support -Werror=format-string

 ochusha-D20100817-format-string.patch |   31 +++++++++++++++++++++++++++++++
 ochusha.spec                          |    7 ++++++-
 2 files changed, 37 insertions(+), 1 deletions(-)
---
diff --git a/ochusha-D20100817-format-string.patch b/ochusha-D20100817-format-string.patch
new file mode 100644
index 0000000..9785e9a
--- /dev/null
+++ b/ochusha-D20100817-format-string.patch
@@ -0,0 +1,31 @@
+--- ochusha-0.6.0.1-cvs20100817T0000/libtscore/tscore.cc.format	2009-01-05 21:16:19.000000000 +0900
++++ ochusha-0.6.0.1-cvs20100817T0000/libtscore/tscore.cc	2013-12-03 17:47:17.237514369 +0900
+@@ -313,7 +313,7 @@ TSCore::output_message(const char *messa
+   if (interaction_output_port->is_output_port())
+     interaction_output_port->get_port()->append(message)->flush();
+   else
+-    printf(message);
++    printf("%s", message);
+ }
+ 
+ 
+--- ochusha-0.6.0.1-cvs20100817T0000/ochusha/bbs_2ch_helper.cc.format	2009-01-01 16:47:06.000000000 +0900
++++ ochusha-0.6.0.1-cvs20100817T0000/ochusha/bbs_2ch_helper.cc	2013-12-03 17:50:17.400365010 +0900
+@@ -354,7 +354,7 @@ BBS2chHelper::login_2ch_be_failed_cb(con
+ 					     GTK_MESSAGE_WARNING,
+ 					     GTK_BUTTONS_OK_CANCEL,
+ 					     _("2ch Be Login failed"));
+-  gtk_message_dialog_format_secondary_text(GTK_MESSAGE_DIALOG(dialog), reason);
++  gtk_message_dialog_format_secondary_text(GTK_MESSAGE_DIALOG(dialog), "%s", reason);
+   gtk_dialog_set_default_response(GTK_DIALOG(dialog), GTK_RESPONSE_OK);
+ 
+   g_signal_connect(dialog, "response",
+@@ -486,7 +486,7 @@ BBS2chHelper::login_2ch_viewer_failed_cb
+ 					     GTK_MESSAGE_WARNING,
+ 					     GTK_BUTTONS_OK_CANCEL,
+ 					     _("2ch Viewer Login failed"));
+-  gtk_message_dialog_format_secondary_text(GTK_MESSAGE_DIALOG(dialog), reason);
++  gtk_message_dialog_format_secondary_text(GTK_MESSAGE_DIALOG(dialog), "%s", reason);
+   gtk_dialog_set_default_response(GTK_DIALOG(dialog), GTK_RESPONSE_OK);
+ 
+   g_signal_connect(dialog, "response",
diff --git a/ochusha.spec b/ochusha.spec
index 26dc56e..f864676 100644
--- a/ochusha.spec
+++ b/ochusha.spec
@@ -21,7 +21,7 @@
 %define		strtag		cvs%{codate}T%{cotime_JST}
 %define		repoid		36733
 
-%define		vendor_rel	13
+%define		vendor_rel	14
 %define		pre_release	1
 
 %if %{pre_release}
@@ -43,6 +43,7 @@ Source:		http://downloads.sourceforge.jp/ochusha/%{repoid}/%{name}-%{version}.ta
 Source10:	ochusha-prefs-gtkrc
 Source11:	ochusha.sh
 Patch0:		ochusha-D20100214-gtk-deprecated.patch
+Patch1:		ochusha-D20100817-format-string.patch
 License:	BSD
 Group:		Applications/Internet
 BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
@@ -76,6 +77,7 @@ images that helps users to interact with BBSs.
 %setup -q
 %endif
 #%%patch0 -p0 -b .gtk
+%patch1 -p1 -b .format
 
 # Icon path fix
 %{__sed} -i -e 's|Icon.*$|Icon=ochusha48|' ochusha/ochusha.desktop.in
@@ -230,6 +232,9 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
 %{_datadir}/icons/hicolor/48x48/apps/*.png
 
 %changelog
+* Tue Dec  3 2013 Mamoru TASAKA <mtasaka at fedoraproject.org> - 0.6.0.1-0.14.cvs20100817T0000
+- Support -Werror=format-string
+
 * Fri Jul 26 2013 Ville Skyttä <ville.skytta at iki.fi> - 0.6.0.1-0.13.cvs20100817T0000
 - Point help URL to %%{_pkgdocdir} where available.
 - Fix bogus dates in %%changelog.


More information about the scm-commits mailing list