Fixed compilation with -Werror=format-security

Resolves: rhbz#1037139
This commit is contained in:
Jaroslav Škarvada 2013-12-04 14:03:31 +01:00
parent e616c4c47e
commit a252dfc2d4
2 changed files with 29 additions and 1 deletions

View File

@ -0,0 +1,22 @@
diff --git a/src/core/network.c b/src/core/network.c
index d7c1017..5954d1f 100644
--- a/src/core/network.c
+++ b/src/core/network.c
@@ -356,7 +356,7 @@ int net_receive(GIOChannel *handle, char *buf, int len)
status = g_io_channel_read_chars(handle, buf, len, &ret, &err);
if (err != NULL) {
- g_warning(err->message);
+ g_warning("%s", err->message);
g_error_free(err);
}
if (status == G_IO_STATUS_ERROR || status == G_IO_STATUS_EOF)
@@ -377,7 +377,7 @@ int net_transmit(GIOChannel *handle, const char *data, int len)
status = g_io_channel_write_chars(handle, (char *) data, len, &ret, &err);
if (err != NULL) {
- g_warning(err->message);
+ g_warning("%s", err->message);
g_error_free(err);
}
if (status == G_IO_STATUS_ERROR)

View File

@ -5,7 +5,7 @@
Summary: Modular text mode IRC client with Perl scripting
Name: irssi
Version: 0.8.16
Release: 0.1%{?pretag:.%{pretag}}%{?dist}
Release: 0.2%{?pretag:.%{pretag}}%{?dist}
License: GPLv2+
Group: Applications/Communications
@ -14,6 +14,7 @@ Source0: http://irssi.org/files/irssi-%{version}%{?pretag:-%{pretag}}.tar.bz2
Source1: irssi-config.h
Patch0: irssi-0.8.15-no-static-unload.patch
Patch1: irssi-0.8.15-man-fix.patch
Patch2: irssi-0.8.16-format-security.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot
BuildRequires: ncurses-devel openssl-devel zlib-devel
BuildRequires: pkgconfig glib2-devel perl-devel perl(ExtUtils::Embed)
@ -42,6 +43,7 @@ being maintained.
%setup -q -n %{name}-%{version}%{?pretag:-%{?pretag}}
%patch0 -p1 -b .no-static-unload
%patch1 -p1 -b .man-fix
%patch2 -p1 -b .format-security
%build
autoreconf -i
@ -92,6 +94,10 @@ rm -rf $RPM_BUILD_ROOT
%changelog
* Wed Dec 4 2013 Jaroslav Škarvada <jskarvad@redhat.com> - 0.8.16-0.2rc1:.%{pretag}}%{?dist}
- Fixed compilation with -Werror=format-security
Resolves: rhbz#1037139
* Mon Sep 16 2013 Jaroslav Škarvada <jskarvad@redhat.com> - 0.8.16-0.1.rc1
- New version
- Dropped init-resize-crash-fix (upstreamed)