From 5c693e1bdb59f6cdbed3e0a4cbd09f284f06786f Mon Sep 17 00:00:00 2001 From: Till Kamppeter Date: Sun, 10 Oct 2021 09:37:21 +0200 Subject: [PATCH] Use cast for snapd_client_run_snapctl2_sync() not remove "const" from args --- scheduler/auth.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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; -- 2.47.2