[libcrypt-gcrypt-perl] 02/04: Add patch from CPAN RT to fix warnings under gcc5.
gregor herrmann
gregoa at debian.org
Sat Feb 27 18:41:54 UTC 2016
This is an automated email from the git hooks/post-receive script.
gregoa pushed a commit to branch master
in repository libcrypt-gcrypt-perl.
commit 3f45e38660b8a07ced5a38050e9e7d64c45e45a8
Author: gregor herrmann <gregoa at debian.org>
Date: Sat Feb 27 19:32:27 2016 +0100
Add patch from CPAN RT to fix warnings under gcc5.
---
debian/patches/gcc5-warnings.patch | 38 ++++++++++++++++++++++++++++++++++++++
debian/patches/series | 1 +
2 files changed, 39 insertions(+)
diff --git a/debian/patches/gcc5-warnings.patch b/debian/patches/gcc5-warnings.patch
new file mode 100644
index 0000000..65e8c09
--- /dev/null
+++ b/debian/patches/gcc5-warnings.patch
@@ -0,0 +1,38 @@
+Subject: [PATCH] Correct some warnings
+ GCC 5 warns about casting pointer to integer and about possible
+ undefined variable. This patch corrects it.
+Origin: CPAN RT
+Bug: https://rt.cpan.org/Public/Bug/Display.html?id=107300
+From: Petr Písař <ppisar at redhat.com>
+Reviewed-by: gregor herrmann <gregoa at debian.org>
+Last-Update: 2016-02-27
+
+--- a/GCrypt.xs
++++ b/GCrypt.xs
+@@ -94,7 +94,7 @@
+ p = memchr((char *) string, '\0', string_len);
+ if (p == NULL) return -1;
+
+- offset = (int) p - (int) string;
++ offset = p - (void *)string;
+ for (i = offset; i < string_len; ++i) {
+ if (string[string_len-i] != '\0') return -1;
+ }
+@@ -104,7 +104,7 @@
+ p = memchr((char *) string, '\32', string_len);
+ if (p == NULL) return -1;
+
+- offset = (int) p - (int) string;
++ offset = p - (void *)string;
+ for (i = offset; i < string_len; ++i) {
+ if (string[string_len-i] != '\32') return -1;
+ }
+@@ -204,7 +204,7 @@
+ cg_new(...)
+ PROTOTYPE: @
+ INIT:
+- char *s, *algo_s, *mode_s, *key_s;
++ char *s, *algo_s = NULL, *mode_s, *key_s;
+ int i, algo, mode;
+ unsigned int c_flags, ac_flags, md_flags;
+ /*
diff --git a/debian/patches/series b/debian/patches/series
index 20b2ff4..e023246 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +1,2 @@
gcrypt-1.6.patch
+gcc5-warnings.patch
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/libcrypt-gcrypt-perl.git
More information about the Pkg-perl-cvs-commits
mailing list