summaryrefslogtreecommitdiff
path: root/Userland
diff options
context:
space:
mode:
Diffstat (limited to 'Userland')
-rw-r--r--Userland/al.cpp6
-rw-r--r--Userland/head.cpp2
-rw-r--r--Userland/ln.cpp2
-rw-r--r--Userland/pape.cpp2
-rw-r--r--Userland/pidof.cpp2
-rw-r--r--Userland/rm.cpp2
-rw-r--r--Userland/shutdown.cpp2
-rw-r--r--Userland/sysctl.cpp3
-rw-r--r--Userland/tail.cpp2
-rw-r--r--Userland/wc.cpp8
10 files changed, 17 insertions, 14 deletions
diff --git a/Userland/al.cpp b/Userland/al.cpp
index 96094d5d6c..3882e56e4d 100644
--- a/Userland/al.cpp
+++ b/Userland/al.cpp
@@ -1,11 +1,15 @@
+#include <AK/StdLibExtras.h>
#include <signal.h>
#include <stdio.h>
#include <unistd.h>
static volatile bool got_alarm = false;
-int main(int c, char** v)
+int main(int argc, char** argv)
{
+ UNUSED_PARAM(argc);
+ UNUSED_PARAM(argv);
+
unsigned ret = alarm(5);
printf("alarm() with no alarm set: %u\n", ret);
ret = alarm(2);
diff --git a/Userland/head.cpp b/Userland/head.cpp
index 5a59603f48..fe41ce3a6e 100644
--- a/Userland/head.cpp
+++ b/Userland/head.cpp
@@ -16,7 +16,7 @@ int main(int argc, char** argv)
args_parser.add_arg("q", "Never print filenames");
args_parser.add_arg("v", "Always print filenames");
- CArgsParserResult args = args_parser.parse(argc, (const char**)argv);
+ CArgsParserResult args = args_parser.parse(argc, argv);
int line_count = 0;
if (args.is_present("n")) {
diff --git a/Userland/ln.cpp b/Userland/ln.cpp
index 54cf0d40d5..f15d2aae2f 100644
--- a/Userland/ln.cpp
+++ b/Userland/ln.cpp
@@ -12,7 +12,7 @@ int main(int argc, char** argv)
args_parser.add_required_single_value("target");
args_parser.add_required_single_value("link-path");
- CArgsParserResult args = args_parser.parse(argc, (const char**)argv);
+ CArgsParserResult args = args_parser.parse(argc, argv);
Vector<String> values = args.get_single_values();
if (values.size() == 0) {
args_parser.print_usage();
diff --git a/Userland/pape.cpp b/Userland/pape.cpp
index b77584165d..817668244c 100644
--- a/Userland/pape.cpp
+++ b/Userland/pape.cpp
@@ -58,7 +58,7 @@ int main(int argc, char** argv)
args_parser.add_arg("c", "show current wallpaper");
args_parser.add_single_value("name");
- CArgsParserResult args = args_parser.parse(argc, (const char**)argv);
+ CArgsParserResult args = args_parser.parse(argc, argv);
if (args.is_present("a"))
return handle_show_all();
diff --git a/Userland/pidof.cpp b/Userland/pidof.cpp
index ea2cb4c57a..a115d9deb1 100644
--- a/Userland/pidof.cpp
+++ b/Userland/pidof.cpp
@@ -39,7 +39,7 @@ int main(int argc, char** argv)
args_parser.add_arg("s", "Single shot - this instructs the program to only return one pid");
args_parser.add_arg("o", "pid", "Tells pidof to omit processes with that pid. The special pid %PPID can be used to name the parent process of the pidof program.");
- CArgsParserResult args = args_parser.parse(argc, (const char**)argv);
+ CArgsParserResult args = args_parser.parse(argc, argv);
bool s_arg = args.is_present("s");
bool o_arg = args.is_present("o");
diff --git a/Userland/rm.cpp b/Userland/rm.cpp
index 2c62f4d628..17ee2ca956 100644
--- a/Userland/rm.cpp
+++ b/Userland/rm.cpp
@@ -58,7 +58,7 @@ int main(int argc, char** argv)
args_parser.add_arg("r", "Delete directory recursively.");
args_parser.add_required_single_value("path");
- CArgsParserResult args = args_parser.parse(argc, (const char**)argv);
+ CArgsParserResult args = args_parser.parse(argc, argv);
Vector<String> values = args.get_single_values();
if (values.size() == 0) {
args_parser.print_usage();
diff --git a/Userland/shutdown.cpp b/Userland/shutdown.cpp
index 7884f12c15..cd2ffe67c1 100644
--- a/Userland/shutdown.cpp
+++ b/Userland/shutdown.cpp
@@ -5,7 +5,7 @@ int main(int argc, char** argv)
{
CArgsParser args_parser("shutdown");
args_parser.add_arg("n", "shut down now");
- CArgsParserResult args = args_parser.parse(argc, (const char**)argv);
+ CArgsParserResult args = args_parser.parse(argc, argv);
if (args.is_present("n")) {
syscall(SC_halt);
diff --git a/Userland/sysctl.cpp b/Userland/sysctl.cpp
index 29e8c7f768..86f75119ea 100644
--- a/Userland/sysctl.cpp
+++ b/Userland/sysctl.cpp
@@ -56,7 +56,6 @@ static int handle_show_all()
return 1;
}
- char pathbuf[PATH_MAX];
while (di.has_next()) {
String variable_name = di.next_path();
printf("%s = %s\n", variable_name.characters(), read_var(variable_name).characters());
@@ -89,7 +88,7 @@ int main(int argc, char** argv)
args_parser.add_arg("a", "show all variables");
args_parser.add_single_value("variable=[value]");
- CArgsParserResult args = args_parser.parse(argc, (const char**)argv);
+ CArgsParserResult args = args_parser.parse(argc, argv);
if (args.is_present("a")) {
return handle_show_all();
diff --git a/Userland/tail.cpp b/Userland/tail.cpp
index 0da99fa910..be474837e4 100644
--- a/Userland/tail.cpp
+++ b/Userland/tail.cpp
@@ -82,7 +82,7 @@ int main(int argc, char* argv[])
args_parser.add_arg("n", "lines", "fetch the specified number of lines");
args_parser.add_required_single_value("file");
- CArgsParserResult args = args_parser.parse(argc, (const char**)argv);
+ CArgsParserResult args = args_parser.parse(argc, argv);
Vector<String> values = args.get_single_values();
if (values.size() != 1) {
diff --git a/Userland/wc.cpp b/Userland/wc.cpp
index f9f77f5a7e..c518a0936d 100644
--- a/Userland/wc.cpp
+++ b/Userland/wc.cpp
@@ -5,9 +5,9 @@
#include <ctype.h>
#include <stdio.h>
-bool output_chars = false;
-bool output_words = false;
-bool output_lines = false;
+static bool output_chars = false;
+static bool output_words = false;
+static bool output_lines = false;
struct Count {
String file;
@@ -74,7 +74,7 @@ int main(int argc, char** argv)
args_parser.add_arg("c", "Include bytes in count");
args_parser.add_arg("m", "Include chars in count");
args_parser.add_arg("w", "Include words in count");
- CArgsParserResult args = args_parser.parse(argc, (const char**)argv);
+ CArgsParserResult args = args_parser.parse(argc, (char**)argv);
if (args.is_present("l")) {
output_lines = true;