Pass compilation with -Werror=format-security
This commit is contained in:
parent
3ee4f054cd
commit
9c75268290
@ -0,0 +1,30 @@
|
||||
From ec0820718ccb224bafcddd82a281953b73a9e0b6 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar@redhat.com>
|
||||
Date: Wed, 4 Dec 2013 14:35:44 +0100
|
||||
Subject: [PATCH] Pass compilation with -Werror=format-security
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
<https://bugzilla.redhat.com/show_bug.cgi?id=1037323>
|
||||
|
||||
Signed-off-by: Petr Písař <ppisar@redhat.com>
|
||||
---
|
||||
src/shar-opts.h | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/src/shar-opts.h b/src/shar-opts.h
|
||||
index 2eed57c..70c2792 100644
|
||||
--- a/src/shar-opts.h
|
||||
+++ b/src/shar-opts.h
|
||||
@@ -373,6 +373,7 @@ extern tOptions sharOptions;
|
||||
# include <libintl.h>
|
||||
# endif
|
||||
|
||||
+static inline char* aoGetsText(char const* pz) __attribute__ ((format_arg(1)));
|
||||
static inline char* aoGetsText(char const* pz) {
|
||||
if (pz == NULL) return NULL;
|
||||
return (char*)gettext(pz);
|
||||
--
|
||||
1.8.3.1
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
Summary: The GNU shar utilities for packaging and unpackaging shell archives
|
||||
Name: sharutils
|
||||
Version: 4.14
|
||||
Release: 1%{?dist}
|
||||
Release: 2%{?dist}
|
||||
# The main code: GPLv3+
|
||||
# lib (gnulib): LGPLv3+
|
||||
# lib/sys_socket.in.h: LGPLv2+
|
||||
@ -11,6 +11,8 @@ Release: 1%{?dist}
|
||||
License: GPLv3+ and LGPLv3+ and (LGPLv3+ or BSD) and LGPLv2+ and Public Domain and GFDL
|
||||
Group: Applications/Archiving
|
||||
Source: ftp://ftp.gnu.org/gnu/%{name}/%{name}-%{version}.tar.xz
|
||||
# Pass compilation with -Werror=format-security, bug #1037323
|
||||
Patch0: %{name}-4.14-Pass-compilation-with-Werror-format-security.patch
|
||||
URL: http://www.gnu.org/software/%{name}/
|
||||
BuildRequires: gettext
|
||||
Requires(post): info
|
||||
@ -32,6 +34,7 @@ the shar files.
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
%patch0 -p1 -b .format
|
||||
|
||||
# convert TODO, THANKS to UTF-8
|
||||
for i in TODO THANKS; do
|
||||
@ -68,6 +71,9 @@ fi
|
||||
%{_mandir}/man5/*
|
||||
|
||||
%changelog
|
||||
* Wed Dec 04 2013 Petr Pisar <ppisar@redhat.com> - 4.14-2
|
||||
- Pass compilation with -Werror=format-security (bug #1037323)
|
||||
|
||||
* Mon Oct 21 2013 Petr Pisar <ppisar@redhat.com> - 4.14-1
|
||||
- 4.14 bump
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user