From fc0c39b6fdb685ee64121ad58aa68194b3b35588 Mon Sep 17 00:00:00 2001 From: Fabian Homborg Date: Sat, 19 Oct 2019 14:12:45 +0200 Subject: [PATCH] expand: Remove unused includes sys/sysctl.h is deprecated on glibc, so it leads to warnings. According to fa4ec55c96, it was included for KERN_PROCARGS2 for process expansion, but process expansion is gone, so it's unused now. (there is another use of it in common.cpp, but that's only on FreeBSD) Also 1f06e5f0b9ee483053b987c9cab9f1f5fce2590 only included tokenizer.h (present since the initial commit) if KERN_PROCARGS2 wasn't available, so it can't have been important. This builds and passes the tests on: - Archlinux, with glibc 2.30 - Alpine, with musl - FreeBSD - NetBSD --- src/expand.cpp | 7 ------- 1 file changed, 7 deletions(-) diff --git a/src/expand.cpp b/src/expand.cpp index c363bcbba..32fcf6d4e 100644 --- a/src/expand.cpp +++ b/src/expand.cpp @@ -13,9 +13,6 @@ #include #include -#ifdef HAVE_SYS_SYSCTL_H -#include // IWYU pragma: keep -#endif #ifdef SunOS #include #endif @@ -51,10 +48,6 @@ #include "wcstringutil.h" #include "wildcard.h" #include "wutil.h" // IWYU pragma: keep -#ifdef KERN_PROCARGS2 -#else -#include "tokenizer.h" -#endif /// Characters which make a string unclean if they are the first character of the string. See \c /// expand_is_clean().