diff options
author | Petr Lautrbach <plautrba@redhat.com> | 2015-03-13 15:54:09 +0100 |
---|---|---|
committer | Stephen Smalley <sds@tycho.nsa.gov> | 2015-03-13 14:14:23 -0400 |
commit | 417cb8d076a31c57710429b255aebc595613eb6b (patch) | |
tree | f6b7f13e7bbd412bdd1f2287f938fc09d757810a /libselinux/src/label_android_property.c | |
parent | 93e557cab6deeec09a9dc3294dba2a830ce27587 (diff) | |
download | android_external_selinux-417cb8d076a31c57710429b255aebc595613eb6b.tar.gz android_external_selinux-417cb8d076a31c57710429b255aebc595613eb6b.tar.bz2 android_external_selinux-417cb8d076a31c57710429b255aebc595613eb6b.zip |
Fix -Wformat errors
Fixes two types of errors which appear when building with gcc-5.0.0
- format ‘%d’ expects argument of type ‘int’, but argument X has type ‘unsigned int’
- format ‘%a’ expects argument of type ‘float *’, but argument X has type ‘char **’
Signed-off-by: Petr Lautrbach <plautrba@redhat.com>
Diffstat (limited to 'libselinux/src/label_android_property.c')
-rw-r--r-- | libselinux/src/label_android_property.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/libselinux/src/label_android_property.c b/libselinux/src/label_android_property.c index 8568784b..1a293569 100644 --- a/libselinux/src/label_android_property.c +++ b/libselinux/src/label_android_property.c @@ -101,7 +101,7 @@ static int process_line(struct selabel_handle *rec, items = sscanf(line_buf, "%255s %255s", prop, context); if (items != 2) { selinux_log(SELINUX_WARNING, - "%s: line %d is missing fields, skipping\n", path, + "%s: line %u is missing fields, skipping\n", path, lineno); return 0; } @@ -111,7 +111,7 @@ static int process_line(struct selabel_handle *rec, spec_arr[nspec].property_key = strdup(prop); if (!spec_arr[nspec].property_key) { selinux_log(SELINUX_WARNING, - "%s: out of memory at line %d on prop %s\n", + "%s: out of memory at line %u on prop %s\n", path, lineno, prop); return -1; @@ -120,7 +120,7 @@ static int process_line(struct selabel_handle *rec, spec_arr[nspec].lr.ctx_raw = strdup(context); if (!spec_arr[nspec].lr.ctx_raw) { selinux_log(SELINUX_WARNING, - "%s: out of memory at line %d on context %s\n", + "%s: out of memory at line %u on context %s\n", path, lineno, context); return -1; } @@ -128,7 +128,7 @@ static int process_line(struct selabel_handle *rec, if (rec->validating) { if (selabel_validate(rec, &spec_arr[nspec].lr) < 0) { selinux_log(SELINUX_WARNING, - "%s: line %d has invalid context %s\n", + "%s: line %u has invalid context %s\n", path, lineno, spec_arr[nspec].lr.ctx_raw); } } |