summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibC
diff options
context:
space:
mode:
authorBen Wiederhake <BenWiederhake.GitHub@gmx.de>2023-01-02 16:57:12 +0100
committerTim Flynn <trflynn89@pm.me>2023-01-02 20:27:20 -0500
commit6b7ce19161d352dd8f479e9fef6ffe8cefb46b3c (patch)
tree7a8a8e083d004a142891fa775dec34638331de4f /Userland/Libraries/LibC
parentf07847e099b203e42b6cc613acf3eecd4af55c9d (diff)
downloadserenity-6b7ce19161d352dd8f479e9fef6ffe8cefb46b3c.zip
Everywhere: Remove unused includes of LibC/stdlib.h
These instances were detected by searching for files that include stdlib.h, but don't match the regex: \\b(_abort|abort|abs|aligned_alloc|arc4random|arc4random_buf|arc4random_ uniform|atexit|atof|atoi|atol|atoll|bsearch|calloc|clearenv|div|div_t|ex it|_Exit|EXIT_FAILURE|EXIT_SUCCESS|free|getenv|getprogname|grantpt|labs| ldiv|ldiv_t|llabs|lldiv|lldiv_t|malloc|malloc_good_size|malloc_size|mble n|mbstowcs|mbtowc|mkdtemp|mkstemp|mkstemps|mktemp|posix_memalign|posix_o penpt|ptsname|ptsname_r|putenv|qsort|qsort_r|rand|RAND_MAX|random|reallo c|realpath|secure_getenv|serenity_dump_malloc_stats|serenity_setenv|sete nv|setprogname|srand|srandom|strtod|strtof|strtol|strtold|strtoll|strtou l|strtoull|system|unlockpt|unsetenv|wcstombs|wctomb)\\b (Without the linebreaks.) This regex is pessimistic, so there might be more files that don't actually use anything from the stdlib. In theory, one might use LibCPP to detect things like this automatically, but let's do this one step after another.
Diffstat (limited to 'Userland/Libraries/LibC')
-rw-r--r--Userland/Libraries/LibC/crt0_shared.cpp1
-rw-r--r--Userland/Libraries/LibC/getsubopt.cpp1
-rw-r--r--Userland/Libraries/LibC/grp.cpp1
-rw-r--r--Userland/Libraries/LibC/math.cpp1
-rw-r--r--Userland/Libraries/LibC/pwd.cpp1
-rw-r--r--Userland/Libraries/LibC/shadow.cpp1
-rw-r--r--Userland/Libraries/LibC/spawn.cpp1
-rw-r--r--Userland/Libraries/LibC/time.cpp1
8 files changed, 0 insertions, 8 deletions
diff --git a/Userland/Libraries/LibC/crt0_shared.cpp b/Userland/Libraries/LibC/crt0_shared.cpp
index d763a6f696..b3ca3a5c8f 100644
--- a/Userland/Libraries/LibC/crt0_shared.cpp
+++ b/Userland/Libraries/LibC/crt0_shared.cpp
@@ -7,7 +7,6 @@
#include <AK/Types.h>
#include <assert.h>
#include <stdio.h>
-#include <stdlib.h>
#include <sys/internals.h>
#include <unistd.h>
diff --git a/Userland/Libraries/LibC/getsubopt.cpp b/Userland/Libraries/LibC/getsubopt.cpp
index 1f8c65635b..ea24411bec 100644
--- a/Userland/Libraries/LibC/getsubopt.cpp
+++ b/Userland/Libraries/LibC/getsubopt.cpp
@@ -6,7 +6,6 @@
#include <AK/ScopeGuard.h>
#include <AK/StringView.h>
-#include <stdlib.h>
#include <string.h>
#include <unistd.h>
diff --git a/Userland/Libraries/LibC/grp.cpp b/Userland/Libraries/LibC/grp.cpp
index e505806685..376f95e872 100644
--- a/Userland/Libraries/LibC/grp.cpp
+++ b/Userland/Libraries/LibC/grp.cpp
@@ -12,7 +12,6 @@
#include <errno_codes.h>
#include <grp.h>
#include <stdio.h>
-#include <stdlib.h>
#include <string.h>
#include <unistd.h>
diff --git a/Userland/Libraries/LibC/math.cpp b/Userland/Libraries/LibC/math.cpp
index 1db9f22c0a..ada821963a 100644
--- a/Userland/Libraries/LibC/math.cpp
+++ b/Userland/Libraries/LibC/math.cpp
@@ -20,7 +20,6 @@
#include <fenv.h>
#include <math.h>
#include <stdint.h>
-#include <stdlib.h>
#if defined(AK_COMPILER_CLANG)
# pragma clang diagnostic push
diff --git a/Userland/Libraries/LibC/pwd.cpp b/Userland/Libraries/LibC/pwd.cpp
index ba2424e452..6ea61a4fa9 100644
--- a/Userland/Libraries/LibC/pwd.cpp
+++ b/Userland/Libraries/LibC/pwd.cpp
@@ -11,7 +11,6 @@
#include <errno.h>
#include <pwd.h>
#include <stdio.h>
-#include <stdlib.h>
#include <string.h>
#include <unistd.h>
diff --git a/Userland/Libraries/LibC/shadow.cpp b/Userland/Libraries/LibC/shadow.cpp
index 9464e87d42..207c1240fd 100644
--- a/Userland/Libraries/LibC/shadow.cpp
+++ b/Userland/Libraries/LibC/shadow.cpp
@@ -11,7 +11,6 @@
#include <errno.h>
#include <shadow.h>
#include <stdio.h>
-#include <stdlib.h>
#include <string.h>
#include <unistd.h>
diff --git a/Userland/Libraries/LibC/spawn.cpp b/Userland/Libraries/LibC/spawn.cpp
index 00213798f7..5d4a3b3bf8 100644
--- a/Userland/Libraries/LibC/spawn.cpp
+++ b/Userland/Libraries/LibC/spawn.cpp
@@ -18,7 +18,6 @@
#include <errno.h>
#include <fcntl.h>
#include <stdio.h>
-#include <stdlib.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <unistd.h>
diff --git a/Userland/Libraries/LibC/time.cpp b/Userland/Libraries/LibC/time.cpp
index b771e5799c..a83b440ffb 100644
--- a/Userland/Libraries/LibC/time.cpp
+++ b/Userland/Libraries/LibC/time.cpp
@@ -15,7 +15,6 @@
#include <errno.h>
#include <limits.h>
#include <stdio.h>
-#include <stdlib.h>
#include <string.h>
#include <sys/time.h>
#include <sys/times.h>