[ethtool] 18/24: Add post-4.2 patches to fix function prototypes

debian-kernel at lists.debian.org debian-kernel at lists.debian.org
Fri Oct 9 03:48:42 UTC 2015


This is an automated email from the git hooks/post-receive script.

benh pushed a commit to branch master
in repository ethtool.

commit 3a7ede806383cad5b3942cd6d8b80bf3f5c89729
Author: Ben Hutchings <ben at decadent.org.uk>
Date:   Fri Oct 9 04:09:04 2015 +0100

    Add post-4.2 patches to fix function prototypes
---
 debian/changelog                                   |  2 ++
 ...-function-declarations-when-building-test.patch | 41 ++++++++++++++++++++++
 .../fix-return-type-of-test_free-prorotype.patch   | 27 ++++++++++++++
 debian/patches/series                              |  2 ++
 4 files changed, 72 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index fa400b9..75b12f7 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,6 +1,8 @@
 ethtool (1:4.2-1) UNRELEASED; urgency=medium
 
   * New upstream release
+  * Fix missing function declarations when building tests
+  * Fix return type of test_free() prorotype (Closes: #747959)
 
  -- Ben Hutchings <ben at decadent.org.uk>  Fri, 09 Oct 2015 03:54:03 +0100
 
diff --git a/debian/patches/fix-missing-function-declarations-when-building-test.patch b/debian/patches/fix-missing-function-declarations-when-building-test.patch
new file mode 100644
index 0000000..d660058
--- /dev/null
+++ b/debian/patches/fix-missing-function-declarations-when-building-test.patch
@@ -0,0 +1,41 @@
+From: Ben Hutchings <ben at decadent.org.uk>
+Date: Fri, 9 Oct 2015 03:59:30 +0100
+Subject: [PATCH ethtool 1/2] Fix missing function declarations when building
+ tests
+Origin: https://git.kernel.org/cgit/network/ethtool/ethtool.git/commit/?id=0732e9a7b30af903793c313eef4bd93cdad51099
+
+Fix these compiler warnings by declaring test_exit() and test_main()
+regardless of whether TEST_NO_WRAPPERS is defined:
+
+test-cmdline.c: In function ‘send_ioctl’:
+test-cmdline.c:268:2: warning: implicit declaration of function ‘test_exit’ [-Wimplicit-function-declaration]
+  test_exit(0);
+  ^
+test-common.c: In function ‘test_cmdline’:
+test-common.c:361:21: warning: implicit declaration of function ‘test_main’ [-Wimplicit-function-declaration]
+  rc = rc ? rc - 1 : test_main(argc, argv);
+                     ^
+
+Signed-off-by: Ben Hutchings <ben at decadent.org.uk>
+---
+ internal.h | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/internal.h b/internal.h
+index 444810d..156770c 100644
+--- a/internal.h
++++ b/internal.h
+@@ -132,10 +132,11 @@ struct cmd_expect {
+ int test_ioctl(const struct cmd_expect *expect, void *cmd);
+ #define TEST_IOCTL_MISMATCH (-2)
+ 
+-#ifndef TEST_NO_WRAPPERS
+ int test_main(int argc, char **argp);
+-#define main(...) test_main(__VA_ARGS__)
+ void test_exit(int rc) __attribute__((noreturn));
++
++#ifndef TEST_NO_WRAPPERS
++#define main(...) test_main(__VA_ARGS__)
+ #undef exit
+ #define exit(rc) test_exit(rc)
+ void *test_malloc(size_t size);
diff --git a/debian/patches/fix-return-type-of-test_free-prorotype.patch b/debian/patches/fix-return-type-of-test_free-prorotype.patch
new file mode 100644
index 0000000..0cdd9b3
--- /dev/null
+++ b/debian/patches/fix-return-type-of-test_free-prorotype.patch
@@ -0,0 +1,27 @@
+From: Ben Hutchings <ben at decadent.org.uk>
+Date: Fri, 9 Oct 2015 04:01:18 +0100
+Subject: [PATCH ethtool 2/2] Fix return type of test_free() prorotype
+Bug-Debian: https://bugs.debian.org/747959
+Origin: https://git.kernel.org/cgit/network/ethtool/ethtool.git/commit/?id=89a949e67102cf5ea8e906b24850816cae946397
+
+The return type should be void, consistent with the definition and
+with the standard free() function.
+
+Signed-off-by: Ben Hutchings <ben at decadent.org.uk>
+---
+ internal.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/internal.h b/internal.h
+index 156770c..b5ef646 100644
+--- a/internal.h
++++ b/internal.h
+@@ -148,7 +148,7 @@ void *test_calloc(size_t nmemb, size_t size);
+ char *test_strdup(const char *s);
+ #undef strdup
+ #define strdup(s) test_strdup(s)
+-void *test_free(void *ptr);
++void test_free(void *ptr);
+ #undef free
+ #define free(ptr) test_free(ptr)
+ void *test_realloc(void *ptr, size_t size);
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..5abb24c
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1,2 @@
+fix-missing-function-declarations-when-building-test.patch
+fix-return-type-of-test_free-prorotype.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/kernel/ethtool.git



More information about the Kernel-svn-changes mailing list