Android-x86
Fork
Donation

  • R/O
  • HTTP
  • SSH
  • HTTPS

external-koush-Superuser: Commit

external/koush/Superuser


Commit MetaInfo

Revisionb076107daf00dded34de2ea3a3e8081f03f05533 (tree)
Time2019-10-08 19:22:42
AuthorChih-Wei Huang <cwhuang@linu...>
CommiterChih-Wei Huang

Log Message

Fix building issues with pie-x86

Change Summary

Incremental Difference

--- a/Superuser/jni/su/activity.c
+++ b/Superuser/jni/su/activity.c
@@ -167,7 +167,6 @@ int send_request(struct su_context *ctx) {
167167 char user[64];
168168 int needs_owner_login_prompt = get_owner_login_user_args(ctx, user, sizeof(user));
169169
170- int ret;
171170 if (needs_owner_login_prompt) {
172171 char uid[256];
173172 sprintf(uid, "%d", ctx->from.uid);
--- a/Superuser/jni/su/daemon.c
+++ b/Superuser/jni/su/daemon.c
@@ -504,7 +504,7 @@ err:
504504 // List of signals which cause process termination
505505 static int quit_signals[] = { SIGALRM, SIGHUP, SIGPIPE, SIGQUIT, SIGTERM, SIGINT, 0 };
506506
507-static void sighandler(int sig) {
507+static void sighandler(int __attribute__((unused))sig) {
508508 restore_stdin();
509509
510510 // Assume we'll only be called before death
--- a/Superuser/jni/su/db.c
+++ b/Superuser/jni/su/db.c
@@ -89,7 +89,6 @@ policy_t database_check(struct su_context *ctx) {
8989 return INTERACTIVE;
9090 }
9191
92- int result;
9392 char *err = NULL;
9493 struct callback_data_t data;
9594 data.ctx = ctx;
--- a/Superuser/jni/su/su.c
+++ b/Superuser/jni/su/su.c
@@ -884,7 +884,7 @@ int su_main(int argc, char *argv[], int need_client) {
884884
885885 ctx.umask = umask(027);
886886
887- int ret = mkdir(REQUESTOR_CACHE_PATH, 0770);
887+ mkdir(REQUESTOR_CACHE_PATH, 0770);
888888 if (chown(REQUESTOR_CACHE_PATH, st.st_uid, st.st_gid)) {
889889 PLOGE("chown (%s, %ld, %ld)", REQUESTOR_CACHE_PATH, st.st_uid, st.st_gid);
890890 deny(&ctx);
Show on old repository browser