drbd/0010-compat-fix-nla_nest_start_noflag-test.patch

36 lines
1.4 KiB
Diff
Raw Normal View History

From f6078aa51ed5b776eb2f646553872d576c404c60 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Christoph=20B=C3=B6hmwalder?=
<christoph.boehmwalder@linbit.com>
Date: Tue, 13 Aug 2024 12:40:27 +0200
Subject: [PATCH 10/32] compat: fix nla_nest_start_noflag test
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
GCC complains:
returning struct nlattr * from a function with return type int makes
integer from pointer without a cast
Return the proper type from this function.
---
drbd/drbd-kernel-compat/tests/have_nla_nest_start_noflag.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drbd/drbd-kernel-compat/tests/have_nla_nest_start_noflag.c b/drbd/drbd-kernel-compat/tests/have_nla_nest_start_noflag.c
index 1d8037c397c5..62ab06c563b7 100644
--- a/drbd/drbd-kernel-compat/tests/have_nla_nest_start_noflag.c
+++ b/drbd/drbd-kernel-compat/tests/have_nla_nest_start_noflag.c
@@ -1,7 +1,7 @@
/* {"version": "5.1-rc7", "commit": "ae0be8de9a53cda3505865c11826d8ff0640237c", "comment": "nla_nest_start was renamed to _noflag, and the original version became a wrapper adding a flag", "author": "Michal Kubecek <mkubecek@suse.cz>", "date": "Fri Apr 26 11:13:06 2019 +0200"} */
#include <net/netlink.h>
-int dummy(struct sk_buff *skb, int attrtype)
+static struct nlattr *dummy(struct sk_buff *skb, int attrtype)
{
return nla_nest_start_noflag(skb, attrtype);
}
--
2.35.3