Blame SOURCES/sharutils-4.14.2-Pass-compilation-with-Werror-format-security.patch

0c4686
From 851a240296ad2ec2a5f67e84d284d3bf7882745e Mon Sep 17 00:00:00 2001
0c4686
From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar@redhat.com>
0c4686
Date: Mon, 15 Dec 2014 11:20:32 +0100
0c4686
Subject: [PATCH] Pass compilation with -Werror=format-security
0c4686
MIME-Version: 1.0
0c4686
Content-Type: text/plain; charset=UTF-8
0c4686
Content-Transfer-Encoding: 8bit
0c4686
0c4686
<https://bugzilla.redhat.com/show_bug.cgi?id=1037323>
0c4686
0c4686
Signed-off-by: Petr Písař <ppisar@redhat.com>
0c4686
---
0c4686
 libopts/genshell.h  | 2 +-
0c4686
 src/shar-opts.h     | 2 +-
0c4686
 src/unshar-opts.h   | 2 +-
0c4686
 src/uudecode-opts.h | 2 +-
0c4686
 src/uuencode-opts.h | 2 +-
0c4686
 5 files changed, 5 insertions(+), 5 deletions(-)
0c4686
0c4686
diff --git a/libopts/genshell.h b/libopts/genshell.h
0c4686
index 1c18735..0a69bc2 100644
0c4686
--- a/libopts/genshell.h
0c4686
+++ b/libopts/genshell.h
0c4686
@@ -168,7 +168,7 @@ extern tOptions genshelloptOptions;
0c4686
 #   endif
0c4686
 
0c4686
 # ifndef ATTRIBUTE_FORMAT_ARG
0c4686
-#   define ATTRIBUTE_FORMAT_ARG(_a)
0c4686
+#   define ATTRIBUTE_FORMAT_ARG(_a) __attribute__ ((format_arg(_a)))
0c4686
 # endif
0c4686
 
0c4686
 static inline char* aoGetsText(char const* pz) ATTRIBUTE_FORMAT_ARG(1);
0c4686
diff --git a/src/shar-opts.h b/src/shar-opts.h
0c4686
index 64f2f12..a32b69d 100644
0c4686
--- a/src/shar-opts.h
0c4686
+++ b/src/shar-opts.h
0c4686
@@ -374,7 +374,7 @@ extern tOptions sharOptions;
0c4686
 #   endif
0c4686
 
0c4686
 # ifndef ATTRIBUTE_FORMAT_ARG
0c4686
-#   define ATTRIBUTE_FORMAT_ARG(_a)
0c4686
+#   define ATTRIBUTE_FORMAT_ARG(_a) __attribute__ ((format_arg(_a)))
0c4686
 # endif
0c4686
 
0c4686
 static inline char* aoGetsText(char const* pz) ATTRIBUTE_FORMAT_ARG(1);
0c4686
diff --git a/src/unshar-opts.h b/src/unshar-opts.h
0c4686
index ae697af..19e8be7 100644
0c4686
--- a/src/unshar-opts.h
0c4686
+++ b/src/unshar-opts.h
0c4686
@@ -211,7 +211,7 @@ extern tOptions unsharOptions;
0c4686
 #   endif
0c4686
 
0c4686
 # ifndef ATTRIBUTE_FORMAT_ARG
0c4686
-#   define ATTRIBUTE_FORMAT_ARG(_a)
0c4686
+#   define ATTRIBUTE_FORMAT_ARG(_a) __attribute__ ((format_arg(_a)))
0c4686
 # endif
0c4686
 
0c4686
 static inline char* aoGetsText(char const* pz) ATTRIBUTE_FORMAT_ARG(1);
0c4686
diff --git a/src/uudecode-opts.h b/src/uudecode-opts.h
0c4686
index d457488..fd11a20 100644
0c4686
--- a/src/uudecode-opts.h
0c4686
+++ b/src/uudecode-opts.h
0c4686
@@ -189,7 +189,7 @@ extern tOptions uudecodeOptions;
0c4686
 #   endif
0c4686
 
0c4686
 # ifndef ATTRIBUTE_FORMAT_ARG
0c4686
-#   define ATTRIBUTE_FORMAT_ARG(_a)
0c4686
+#   define ATTRIBUTE_FORMAT_ARG(_a) __attribute__ ((format_arg(_a)))
0c4686
 # endif
0c4686
 
0c4686
 static inline char* aoGetsText(char const* pz) ATTRIBUTE_FORMAT_ARG(1);
0c4686
diff --git a/src/uuencode-opts.h b/src/uuencode-opts.h
0c4686
index 7c7ed78..41352ea 100644
0c4686
--- a/src/uuencode-opts.h
0c4686
+++ b/src/uuencode-opts.h
0c4686
@@ -185,7 +185,7 @@ extern tOptions uuencodeOptions;
0c4686
 #   endif
0c4686
 
0c4686
 # ifndef ATTRIBUTE_FORMAT_ARG
0c4686
-#   define ATTRIBUTE_FORMAT_ARG(_a)
0c4686
+#   define ATTRIBUTE_FORMAT_ARG(_a) __attribute__ ((format_arg(_a)))
0c4686
 # endif
0c4686
 
0c4686
 static inline char* aoGetsText(char const* pz) ATTRIBUTE_FORMAT_ARG(1);
0c4686
-- 
0c4686
1.9.3
0c4686