summaryrefslogtreecommitdiffstats
path: root/init
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2015-02-02 16:43:32 -0800
committerElliott Hughes <enh@google.com>2015-02-02 16:43:32 -0800
commitd3e37d14e755f07c7d10925514fdf7267a6abf04 (patch)
tree0582058a39a1eed171d066d03adb04e47625f736 /init
parentb101f8795a3d3d1c1f5c403bafec93f3d90d0360 (diff)
downloadsystem_core-d3e37d14e755f07c7d10925514fdf7267a6abf04.zip
system_core-d3e37d14e755f07c7d10925514fdf7267a6abf04.tar.gz
system_core-d3e37d14e755f07c7d10925514fdf7267a6abf04.tar.bz2
Trivial cleanup of recent changes.
A typo in the documentation for one, and a couple of signed/unsigned warnings in the implementation of the other. Change-Id: I8fb4b7448ac901c543dea7420aabcedf13ec1bd8
Diffstat (limited to 'init')
-rw-r--r--init/Android.mk6
-rw-r--r--init/builtins.c7
-rw-r--r--init/readme.txt2
3 files changed, 9 insertions, 6 deletions
diff --git a/init/Android.mk b/init/Android.mk
index 4df4489..606c199 100644
--- a/init/Android.mk
+++ b/init/Android.mk
@@ -17,7 +17,11 @@ LOCAL_SRC_FILES:= \
ueventd_parser.c \
watchdogd.c
-LOCAL_CFLAGS += -Wno-unused-parameter
+LOCAL_CFLAGS += \
+ -std=gnu11 \
+ -Wall \
+ -Werror -Wno-error=deprecated-declarations \
+ -Wno-unused-parameter \
ifeq ($(strip $(INIT_BOOTCHART)),true)
LOCAL_SRC_FILES += bootchart.c
diff --git a/init/builtins.c b/init/builtins.c
index 303a8ca..2521daf 100644
--- a/init/builtins.c
+++ b/init/builtins.c
@@ -221,16 +221,15 @@ int do_execonce(int nargs, char **args)
*/
zap_stdio();
char *exec_args[100];
- int i;
- int num_process_args = nargs;
+ size_t num_process_args = nargs;
memset(exec_args, 0, sizeof(exec_args));
if (num_process_args > ARRAY_SIZE(exec_args) - 1) {
- ERROR("exec called with %d args, limit is %d", num_process_args,
+ ERROR("exec called with %zu args, limit is %zu", num_process_args,
ARRAY_SIZE(exec_args) - 1);
_exit(1);
}
- for (i = 1; i < num_process_args; i++)
+ for (size_t i = 1; i < num_process_args; i++)
exec_args[i - 1] = args[i];
if (execv(exec_args[0], exec_args) == -1) {
diff --git a/init/readme.txt b/init/readme.txt
index 132a869..e5406ed 100644
--- a/init/readme.txt
+++ b/init/readme.txt
@@ -123,7 +123,7 @@ boot
Triggers of this form occur when the property <name> is set
to the specific value <value>.
- One can also test Mutliple properties to execute a group
+ One can also test multiple properties to execute a group
of commands. For example:
on property:test.a=1 && property:test.b=1