From: Michal Privoznik Date: Mon, 28 Aug 2023 13:34:47 +0000 (+0200) Subject: vircommand: Drop unused arguments from virCommandMassCloseGetFDs*() X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=dfe496ae337f49e0d60a82b7d02170d98c95f701;p=libvirt.git vircommand: Drop unused arguments from virCommandMassCloseGetFDs*() Both virCommandMassCloseGetFDsLinux() and virCommandMassCloseGetFDsGeneric() take @cmd argument only to mark it as unused. Drop it from both. Signed-off-by: Michal Privoznik Reviewed-by: Martin Kletzander --- diff --git a/src/util/vircommand.c b/src/util/vircommand.c index a03fcc37ae..8bd5e5e771 100644 --- a/src/util/vircommand.c +++ b/src/util/vircommand.c @@ -478,8 +478,7 @@ virExecCommon(virCommand *cmd, gid_t *groups, int ngroups) * onto child process (well, the one we will exec soon since this * is called from the child). */ static int -virCommandMassCloseGetFDsLinux(virCommand *cmd G_GNUC_UNUSED, - virBitmap *fds) +virCommandMassCloseGetFDsLinux(virBitmap *fds) { g_autoptr(DIR) dp = NULL; struct dirent *entry; @@ -511,8 +510,7 @@ virCommandMassCloseGetFDsLinux(virCommand *cmd G_GNUC_UNUSED, # else /* !__linux__ */ static int -virCommandMassCloseGetFDsGeneric(virCommand *cmd G_GNUC_UNUSED, - virBitmap *fds) +virCommandMassCloseGetFDsGeneric(virBitmap *fds) { virBitmapSetAll(fds); return 0; @@ -547,10 +545,10 @@ virCommandMassCloseFrom(virCommand *cmd, fds = virBitmapNew(openmax); # ifdef __linux__ - if (virCommandMassCloseGetFDsLinux(cmd, fds) < 0) + if (virCommandMassCloseGetFDsLinux(fds) < 0) return -1; # else - if (virCommandMassCloseGetFDsGeneric(cmd, fds) < 0) + if (virCommandMassCloseGetFDsGeneric(fds) < 0) return -1; # endif