summaryrefslogtreecommitdiffstats
path: root/meta/recipes-connectivity/nfs-utils/nfs-utils/clang-warnings.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-connectivity/nfs-utils/nfs-utils/clang-warnings.patch')
-rw-r--r--meta/recipes-connectivity/nfs-utils/nfs-utils/clang-warnings.patch45
1 files changed, 10 insertions, 35 deletions
diff --git a/meta/recipes-connectivity/nfs-utils/nfs-utils/clang-warnings.patch b/meta/recipes-connectivity/nfs-utils/nfs-utils/clang-warnings.patch
index 20400fef67..fde99b599e 100644
--- a/meta/recipes-connectivity/nfs-utils/nfs-utils/clang-warnings.patch
+++ b/meta/recipes-connectivity/nfs-utils/nfs-utils/clang-warnings.patch
@@ -1,4 +1,7 @@
1Detect warning options during configure 1From 1ab0c326405c6daa06f1a7eb4b0b60bf4e0584c2 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Tue, 31 Dec 2019 08:15:34 -0800
4Subject: [PATCH] Detect warning options during configure
2 5
3Certain options maybe compiler specific therefore its better 6Certain options maybe compiler specific therefore its better
4to detect them before use. 7to detect them before use.
@@ -12,28 +15,12 @@ Wdiscarded-qualifiers is gcc specific and this is no longer needed
12Upstream-Status: Pending 15Upstream-Status: Pending
13Signed-off-by: Khem Raj <raj.khem@gmail.com> 16Signed-off-by: Khem Raj <raj.khem@gmail.com>
14 17
15--- a/configure.ac 18---
16+++ b/configure.ac 19 support/nfs/xcommon.c | 3 +++
17@@ -599,7 +599,6 @@ my_am_cflags="\ 20 1 file changed, 3 insertions(+)
18 -Werror=parentheses \ 21
19 -Werror=aggregate-return \ 22diff --git a/support/nfs/xcommon.c b/support/nfs/xcommon.c
20 -Werror=unused-result \ 23index 3989f0b..e080423 100644
21- -Wno-cast-function-type \
22 -fno-strict-aliasing \
23 "
24
25@@ -619,9 +618,10 @@ CHECK_CCSUPPORT([-Werror=format-overflow
26 CHECK_CCSUPPORT([-Werror=int-conversion], [flg2])
27 CHECK_CCSUPPORT([-Werror=incompatible-pointer-types], [flg3])
28 CHECK_CCSUPPORT([-Werror=misleading-indentation], [flg4])
29+CHECK_CCSUPPORT([-Wno-cast-function-type], [flg5])
30 AX_GCC_FUNC_ATTRIBUTE([format])
31
32-AC_SUBST([AM_CFLAGS], ["$my_am_cflags $flg1 $flg2 $flg3 $flg4"])
33+AC_SUBST([AM_CFLAGS], ["$my_am_cflags $flg1 $flg2 $flg3 $flg4 $flg5"])
34
35 # Make sure that $ACLOCAL_FLAGS are used during a rebuild
36 AC_SUBST([ACLOCAL_AMFLAGS], ["-I $ac_macro_dir \$(ACLOCAL_FLAGS)"])
37--- a/support/nfs/xcommon.c 24--- a/support/nfs/xcommon.c
38+++ b/support/nfs/xcommon.c 25+++ b/support/nfs/xcommon.c
39@@ -98,7 +98,10 @@ nfs_error (const char *fmt, ...) { 26@@ -98,7 +98,10 @@ nfs_error (const char *fmt, ...) {
@@ -47,15 +34,3 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
47 va_end (args); 34 va_end (args);
48 free (fmt2); 35 free (fmt2);
49 } 36 }
50--- a/utils/mount/stropts.c
51+++ b/utils/mount/stropts.c
52@@ -1094,9 +1094,7 @@ static int nfsmount_fg(struct nfsmount_i
53 if (nfs_try_mount(mi))
54 return EX_SUCCESS;
55
56-#pragma GCC diagnostic ignored "-Wdiscarded-qualifiers"
57 if (errno == EBUSY && is_mountpoint(mi->node)) {
58-#pragma GCC diagnostic warning "-Wdiscarded-qualifiers"
59 /*
60 * EBUSY can happen when mounting a filesystem that
61 * is already mounted or when the context= are