[lintian] 01/01: Fix a test suite failure with gcc5
This is an automated email from the git hooks/post-receive script.
broucaries-guest pushed a commit to branch master
in repository lintian.
commit 7888e2ea6dde6aa8a878fc05abfb6b8681e61f75
Author: Bastien ROUCARIÈS <roucaries.bastien+debian@gmail.com>
Date: Mon Aug 3 21:47:03 2015 +0200
Fix a test suite failure with gcc5
Fix it by:
- using compat 9
- removing gets() that does not exist with C11 (used by default
by gcc5).
Signed-off-by: Bastien ROUCARIÈS <roucaries.bastien+debian@gmail.com>
---
debian/changelog | 4 ++++
t/tests/binaries-general/debian/basic.c | 8 +++++---
t/tests/binaries-general/debian/debian/compat | 1 +
3 files changed, 10 insertions(+), 3 deletions(-)
diff --git a/debian/changelog b/debian/changelog
index be76515..0dd0e53 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -51,6 +51,10 @@ lintian (2.5.35) UNRELEASED; urgency=medium
* t/scripts/*.t:
+ [JW] Make all the scripts executable.
+ * t/tests/binaries-general/*:
+ + [BR] Fix a test suite failure with gcc5 by using compat 9, and
+ removing gets() that does not exist with C11 (used by default
+ by gcc5).
-- Niels Thykier <niels@thykier.net> Wed, 22 Jul 2015 22:48:07 +0200
diff --git a/t/tests/binaries-general/debian/basic.c b/t/tests/binaries-general/debian/basic.c
index 7dea5a0..5d03d86 100644
--- a/t/tests/binaries-general/debian/basic.c
+++ b/t/tests/binaries-general/debian/basic.c
@@ -1,12 +1,14 @@
#include <stdio.h>
+#include <string.h>
int
-main(void)
+main(int argc, char *argv[])
{
char t[10];
printf("Hello world!\n");
- /* Bad choice for reading from stdin, but it forces a stack
+ /* Bad choice for reading from a security point of view, but it forces a stack
protector, so meh.
*/
- gets (t);
+ if(argc > 0)
+ (void) strcpy(t,argv[0]);
}
diff --git a/t/tests/binaries-general/debian/debian/compat b/t/tests/binaries-general/debian/debian/compat
new file mode 100644
index 0000000..f11c82a
--- /dev/null
+++ b/t/tests/binaries-general/debian/debian/compat
@@ -0,0 +1 @@
+9
\ No newline at end of file
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/lintian/lintian.git
Reply to: