From 42b6640f21cc445e861f57dc605352a6ac50e3e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= Date: Mon, 5 Feb 2024 04:45:24 +0100 Subject: [PATCH] qubes-gui-runuser: fix parameters order for calloc GCC 14 complains: qubes-gui-runuser.c: In function ...pam_conv_callback...: qubes-gui-runuser.c:48:23: error: ...calloc... sizes specified with ...sizeof... in the earlier argument and not in the later argument [-Werror=calloc-transposed-args] 48 | calloc(sizeof(struct pam_response), num_msg); | ^~~~~~ qubes-gui-runuser.c:48:23: note: earlier argument should specify number of elements, later size of each element cc1: all warnings being treated as errors QubesOS/qubes-issues#8915 --- gui-agent/qubes-gui-runuser.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gui-agent/qubes-gui-runuser.c b/gui-agent/qubes-gui-runuser.c index bdaced45..006efcd7 100644 --- a/gui-agent/qubes-gui-runuser.c +++ b/gui-agent/qubes-gui-runuser.c @@ -45,7 +45,7 @@ static int pam_conv_callback(int num_msg, const struct pam_message **msg, { int i; struct pam_response *resp_array = - calloc(sizeof(struct pam_response), num_msg); + calloc(num_msg, sizeof(struct pam_response)); if (resp_array == NULL) return PAM_BUF_ERR;