From: Till Kamppeter Date: Sun, 10 Oct 2021 07:37:21 +0000 (+0200) Subject: Use cast for snapd_client_run_snapctl2_sync() not remove "const" from args X-Git-Tag: v2.4b1~15 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5c693e1bdb59f6cdbed3e0a4cbd09f284f06786f;p=thirdparty%2Fcups.git Use cast for snapd_client_run_snapctl2_sync() not remove "const" from args --- diff --git a/scheduler/auth.c b/scheduler/auth.c index 938dbfa2f2..9988a6c55f 100644 --- a/scheduler/auth.c +++ b/scheduler/auth.c @@ -2007,7 +2007,7 @@ check_admin_access(cupsd_client_t *con) // I - Client connection const char *cookie; // snapd access cookie int status = 65535; // Status of client Snap context check - char *args[] = // snapctl arguments + const char *args[] = // snapctl arguments { "is-connected", "--apparmor-label", @@ -2037,7 +2037,7 @@ check_admin_access(cupsd_client_t *con) // I - Client connection // Do the client Snap context check... args[2] = context; - if (!snapd_client_run_snapctl2_sync(client, cookie, args, NULL, NULL, &status, NULL, &error)) + if (!snapd_client_run_snapctl2_sync(client, cookie, (char **)args, NULL, NULL, &status, NULL, &error)) { cupsdLogClient(con, CUPSD_LOG_ERROR, "Unable to check snap context: %s", error->message); ret = 0;