OSDN Git Service

Fix building issues with pie-x86 pie-x86 android-x86-9.0-r1 android-x86-9.0-r2
authorChih-Wei Huang <cwhuang@linux.org.tw>
Tue, 8 Oct 2019 10:22:42 +0000 (18:22 +0800)
committerChih-Wei Huang <cwhuang@linux.org.tw>
Tue, 8 Oct 2019 10:22:42 +0000 (18:22 +0800)
Superuser/jni/su/activity.c
Superuser/jni/su/daemon.c
Superuser/jni/su/db.c
Superuser/jni/su/su.c

index a3ef9c7..0518032 100644 (file)
@@ -167,7 +167,6 @@ int send_request(struct su_context *ctx) {
     char user[64];
     int needs_owner_login_prompt = get_owner_login_user_args(ctx, user, sizeof(user));
 
-    int ret;
     if (needs_owner_login_prompt) {
         char uid[256];
         sprintf(uid, "%d", ctx->from.uid);
index d6420ee..b415f47 100644 (file)
@@ -504,7 +504,7 @@ err:
 // List of signals which cause process termination
 static int quit_signals[] = { SIGALRM, SIGHUP, SIGPIPE, SIGQUIT, SIGTERM, SIGINT, 0 };
 
-static void sighandler(int sig) {
+static void sighandler(int __attribute__((unused))sig) {
     restore_stdin();
 
     // Assume we'll only be called before death
index 6b5b2e5..dd47197 100644 (file)
@@ -89,7 +89,6 @@ policy_t database_check(struct su_context *ctx) {
         return INTERACTIVE;
     }
     
-    int result;
     char *err = NULL;
     struct callback_data_t data;
     data.ctx = ctx;
index 9cfaa6f..19cf2e9 100644 (file)
@@ -884,7 +884,7 @@ int su_main(int argc, char *argv[], int need_client) {
 
     ctx.umask = umask(027);
 
-    int ret = mkdir(REQUESTOR_CACHE_PATH, 0770);
+    mkdir(REQUESTOR_CACHE_PATH, 0770);
     if (chown(REQUESTOR_CACHE_PATH, st.st_uid, st.st_gid)) {
         PLOGE("chown (%s, %ld, %ld)", REQUESTOR_CACHE_PATH, st.st_uid, st.st_gid);
         deny(&ctx);