[PATCH 02/21] Require sparse to build and stop egrep warnings
Valerie Aurora
val at versity.com
Tue Feb 11 13:18:58 PST 2025
Prevent me from adding any more endianness bugs by requiring sparse to
build. Also switch from egrep to grep -E to stop extraneous warning
messages.
Signed-off-by: Valerie Aurora <val at versity.com>
---
scripts/sparse.sh | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/scripts/sparse.sh b/scripts/sparse.sh
index 9379161..ee637ed 100755
--- a/scripts/sparse.sh
+++ b/scripts/sparse.sh
@@ -1,9 +1,13 @@
#!/bin/bash
-# can we find sparse? If not, we're done.
-which sparse > /dev/null 2>&1 || exit 0
+# require sparse to build to prevent bugs
+which sparse > /dev/null 2>&1
+if [ "$?" != 0 ]; then
+ echo "Must install sparse to build"
+ exit 1
+fi
-#
+#
# one of the problems with using sparse in userspace is that it picks up
# things in system headers that we don't care about. We're willing to
# take on the burden of filtering them out so that we can have it tell
@@ -53,7 +57,7 @@ else
m64=""
fi
-sparse $m64 $include $search/include "$@" 2>&1 | egrep -v "($RE)" | tee .sparse.output
+sparse $m64 $include $search/include "$@" 2>&1 | grep -E -v "($RE)" | tee .sparse.output
if [ -s .sparse.output ]; then
exit 1
else
--
2.48.1
More information about the ngnfs-devel
mailing list