From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ej1-x631.google.com (mail-ej1-x631.google.com [IPv6:2a00:1450:4864:20::631]) by sourceware.org (Postfix) with ESMTPS id CBE313858C52 for ; Thu, 21 Dec 2023 10:00:12 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org CBE313858C52 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org CBE313858C52 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a00:1450:4864:20::631 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1703152814; cv=none; b=vADLxs6HKjvP7pBryIfTRBnXA5NUgafXznjm7ETgYlSKSigGPvRnvw5UM5qxbXPlwvfj3UcNrFWlBTTTyG0Cc9UPIhiK4pwBXcj+yy3ZtghB19/6hGjZkA6EK/04AvoqcWrwPiPSrF+5QA/iq/ek+SxoVz1eJyP4kjPABxtpZaY= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1703152814; c=relaxed/simple; bh=JOza6vJWqJgPCCCp5F+YcjF/K8eCmdDaKCFYelJfKv4=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=SVxukMhoZm8krShA3wCqDv23fLeYSDYFLt5EmS+LmCwl2yssiC7lEqiyhiKQzX0odPoljzkluF/suufmEfU5Tf7l4xyPEoenL0IHIk7vSNqXPNqvPcS7Dlx0CZ85vuuEudTmFSmsTEZ+ohHq+bGFtJfJvh+qaVHcey2pI+54EWY= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-ej1-x631.google.com with SMTP id a640c23a62f3a-a2345aaeb05so66243166b.0 for ; Thu, 21 Dec 2023 02:00:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1703152811; x=1703757611; darn=sourceware.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=L6Kl0OI9CpuxF8ZPOURJMu/J3Zv9OZKQV1wK+5RaVTQ=; b=Tqrh8Cv5UwgOW+9sGncyxBiw9V0Y+VHj0FijFfs3Cs5+n52ZZwz16x+YwIeH/2zvn/ HLf8igqF/GjJGaWJ+r6djpuKqxbuOm2V9ix5M4SW2TKzD7++P8lUzIPcmVp6DaY4644K BM/b9vcOD9JZOYTKeB5S/+SdBhnb1p6dDXxUpcohJFEoJ6r+FCe0/R81xqSKIT7NWBNv znG0htTtMuagGznHyPIcwTSIAGMGOXXAzFS63FIl/0kk21SUD7AHj1Yjk+f3amMuigVH +6fHDcW0ITnCpODGcosXiuINEB53nV/87jRK7k32F56eVyn2lR/vSoDeksahJVAXHXR+ F9oA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1703152811; x=1703757611; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=L6Kl0OI9CpuxF8ZPOURJMu/J3Zv9OZKQV1wK+5RaVTQ=; b=LKWg1FIQtduYbQSLaF77SJ9jbPGBhJBgWRrbVG6+2g0RxyvpswX0UmOJo5hEbgPBSE 1Bl4HS1OU30yk12aMxv4+ti94OtDGYtic4vISSbx74HEMCasNdY5CbZjir9YoFbuDKrT lZSA6QhasEVhcTNjgQGRBPvahLcFeMEvjHxQPqqFuEhfPSHRdMeqZmVGbZ9kQ9xyB1sr pyScmvph1GCkKbDLb6j2ZLZ6ZyphTmH8BbxZQcGZaVtWT16xiUVVSvQJhH2Z7UNgqaDK seyI21rutMt7UPidIALziG0zPe8Yycn10bEP1v9BUz+ZlZYz895Qqofn1GVAjR43Oxnk k8PQ== X-Gm-Message-State: AOJu0Yz+tfqQ2UH+DGJXpOS+HCJ1gpWBUFReCQk+zNZgCNne31nzCDnx C5N2XjsF7BX36ysECTNvzUTRjk43Tp0= X-Google-Smtp-Source: AGHT+IHlHYtkd3kfmw1uSCBItB7jBl+ZnY79HKgDNPjjJ4SVeIc7fl27+b3T7HODXH668eeWyh0Ijg== X-Received: by 2002:a17:906:140f:b0:a23:6d5a:7dcb with SMTP id p15-20020a170906140f00b00a236d5a7dcbmr2805266ejc.75.1703152811261; Thu, 21 Dec 2023 02:00:11 -0800 (PST) Received: from nz.home (host86-152-202-149.range86-152.btcentralplus.com. [86.152.202.149]) by smtp.gmail.com with ESMTPSA id zx16-20020a170907349000b00a26912272eesm776314ejb.4.2023.12.21.02.00.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 Dec 2023 02:00:10 -0800 (PST) Received: by nz.home (Postfix, from userid 1000) id A776F14289CAF0; Thu, 21 Dec 2023 10:00:09 +0000 (GMT) From: Sergei Trofimovich To: systemtap@sourceware.org Cc: Sergei Trofimovich Subject: [PATCH] staprun: fix build against upcoming `gcc-14` (`-Werror=calloc-transposed-args`) Date: Thu, 21 Dec 2023 10:00:06 +0000 Message-ID: <20231221100006.3059923-1-slyich@gmail.com> X-Mailer: git-send-email 2.42.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-11.7 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,GIT_PATCH_0,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: `gcc-14` added a new `-Wcalloc-transposed-args` warning recently. It detected minor infelicity in `calloc()` API usage in `systemtap`: staprun.c: In function 'main': staprun.c:550:50: error: 'calloc' sizes specified with 'sizeof' in the earlier argument and not in the later argument [-Werror=calloc-transposed-args] 550 | char ** new_argv = calloc(sizeof(char *),argc+2); | ^~~~ --- staprun/staprun.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/staprun/staprun.c b/staprun/staprun.c index 8437f3af6..d1b0b221b 100644 --- a/staprun/staprun.c +++ b/staprun/staprun.c @@ -547,7 +547,7 @@ int main(int argc, char **argv) us to extend argv[], with all the C fun that entails. */ #ifdef HAVE_OPENAT if (relay_basedir_fd >= 0) { - char ** new_argv = calloc(sizeof(char *),argc+2); + char ** new_argv = calloc(argc+2, sizeof(char *)); const int new_Foption_size = 10; /* -FNNNNN */ char * new_Foption = malloc(new_Foption_size); int i; -- 2.42.0