From nobody Sun Sep 7 23:49:50 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) client-ip=8.43.85.245; envelope-from=devel-bounces@lists.libvirt.org; helo=lists.libvirt.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass(p=reject dis=none) header.from=lists.libvirt.org ARC-Seal: i=1; a=rsa-sha256; t=1756816526; cv=none; d=zohomail.com; s=zohoarc; b=jLRT2ezqtJQay5mJv5jFH2WRzXwujly+nTDkySSzY9xdEXCmlPrLCBlp7RAOqeywCzgn3ZMUKXRhCEoE2QRFncNhgMhafnmZLFvHMXmzFQPsPUDk2V3yoBOy+bqyG6FDFUMVHK0E4/0K/PALHzM/QOWIblvEDCjCrhWNaNFvOCg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1756816526; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:List-Subscribe:List-Post:List-Owner:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Reply-To:Subject:Subject:To:To:Message-Id:Cc; bh=sgd8royQKHWr11Z+hqSEPZ5Bswb7DA7dkKg0BhZxvCg=; b=Dj3ejJ4aY8wnQYJGoCI5cicGBp8sIsVKtHzD9Q4lRSuG5MwdOvuIaBP1CHexCJ/7AvR3LGJI8plv1YGCMgw6tdGI9V4jPcimv/RTBu0q/Ml7HRVZLTcZysJDikfqWWbxY1fRKykgIXCV9WJnZ5XIQIJCfnY24kuEqXC9SrVoCxk= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.libvirt.org (lists.libvirt.org [8.43.85.245]) by mx.zohomail.com with SMTPS id 175681652665824.341625503120326; Tue, 2 Sep 2025 05:35:26 -0700 (PDT) Received: by lists.libvirt.org (Postfix, from userid 993) id DA1EF440F2; Tue, 2 Sep 2025 08:35:25 -0400 (EDT) Received: from [172.19.199.3] (lists.libvirt.org [8.43.85.245]) by lists.libvirt.org (Postfix) with ESMTP id D953344284; Tue, 2 Sep 2025 08:34:32 -0400 (EDT) Received: by lists.libvirt.org (Postfix, from userid 993) id A05DC4404B; Tue, 2 Sep 2025 08:34:21 -0400 (EDT) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (3072 bits) server-digest SHA256) (No client certificate requested) by lists.libvirt.org (Postfix) with ESMTPS id 21C043FABD for ; Tue, 2 Sep 2025 08:34:19 -0400 (EDT) Received: from mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-168-1YJaDbdaNKCXJWPbd2b0uQ-1; Tue, 02 Sep 2025 08:34:17 -0400 Received: from mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.111]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id B1367180028E for ; Tue, 2 Sep 2025 12:34:16 +0000 (UTC) Received: from hjs (unknown [10.43.3.187]) by mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 0898618002A0 for ; Tue, 2 Sep 2025 12:34:15 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on lists.libvirt.org X-Spam-Level: X-Spam-Status: No, score=-1.5 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_DNSWL_LOW, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED,SPF_PASS autolearn=unavailable autolearn_force=no version=4.0.1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1756816458; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=sgd8royQKHWr11Z+hqSEPZ5Bswb7DA7dkKg0BhZxvCg=; b=Ny0FDdaTZTy4kP9TsRD/JsBuO7U8F269aun4qUKfOnUzAy0rILvAwnP6O/NjocK0AnKVpB S4SrutQNxxtFHlhEgEsV6RnAlCpd5z04A/FCd5JYQuOdEnh950FBQEmG5D/E0YRJRnO3le GmX1ro95h7qvGkpNTbAYYu7n4FVVpIk= X-MC-Unique: 1YJaDbdaNKCXJWPbd2b0uQ-1 X-Mimecast-MFC-AGG-ID: 1YJaDbdaNKCXJWPbd2b0uQ_1756816456 To: devel@lists.libvirt.org Subject: [libvirt PATCH] esx: pass 'long' to curl_easy_setopt when needed Date: Tue, 2 Sep 2025 14:34:04 +0200 Message-ID: <79db1a222064516044842523c3dbda3da2f68ab1.1756816444.git.jtomko@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.111 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: -IIQarFcZiE4rZhG9NBV0x3NJn3mHNtWe62-M4A1grg_1756816456 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-ID-Hash: 5BHY77MAQQORU3SDKVDABEYIZKVSKPRJ X-Message-ID-Hash: 5BHY77MAQQORU3SDKVDABEYIZKVSKPRJ X-MailFrom: jtomko@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; header-match-devel.lists.libvirt.org-0; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.10 Precedence: list List-Id: Development discussions about the libvirt library & tools Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: =?utf-8?q?J=C3=A1n_Tomko_via_Devel?= Reply-To: =?UTF-8?q?J=C3=A1n=20Tomko?= X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1756816529153124100 From: J=C3=A1n Tomko The include header got its type checks fixed in curl 8.14: https://github.com/curl/curl/commit/79b4e56b3f30dc1ac28a81128a07d27338e5219e https://github.com/curl/curl/pull/17143 This causes a warning on rawhide with clang: ../src/esx/esx_vi.c:318:5: error: call to '_curl_easy_setopt_err_long' declared with 'warning' attribute: curl_easy_setopt expects a long argument [-Werror,-Wattribute-warning] 318 | curl_easy_setopt(curl->handle, CURLOPT_NOSIGNAL, 1); | ^ Signed-off-by: J=C3=A1n Tomko --- src/esx/esx_stream.c | 6 +++--- src/esx/esx_vi.c | 24 ++++++++++++------------ 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/src/esx/esx_stream.c b/src/esx/esx_stream.c index 1439940330..143b2405ed 100644 --- a/src/esx/esx_stream.c +++ b/src/esx/esx_stream.c @@ -405,13 +405,13 @@ esxStreamOpen(virStreamPtr stream, esxPrivate *priv, = const char *url, goto cleanup; =20 if (mode =3D=3D ESX_STREAM_MODE_UPLOAD) { - curl_easy_setopt(streamPriv->curl->handle, CURLOPT_UPLOAD, 1); + curl_easy_setopt(streamPriv->curl->handle, CURLOPT_UPLOAD, 1L); curl_easy_setopt(streamPriv->curl->handle, CURLOPT_READFUNCTION, esxVI_CURL_ReadStream); curl_easy_setopt(streamPriv->curl->handle, CURLOPT_READDATA, strea= mPriv); } else { - curl_easy_setopt(streamPriv->curl->handle, CURLOPT_UPLOAD, 0); - curl_easy_setopt(streamPriv->curl->handle, CURLOPT_HTTPGET, 1); + curl_easy_setopt(streamPriv->curl->handle, CURLOPT_UPLOAD, 0L); + curl_easy_setopt(streamPriv->curl->handle, CURLOPT_HTTPGET, 1L); curl_easy_setopt(streamPriv->curl->handle, CURLOPT_WRITEFUNCTION, esxVI_CURL_WriteStream); curl_easy_setopt(streamPriv->curl->handle, CURLOPT_WRITEDATA, stre= amPriv); diff --git a/src/esx/esx_vi.c b/src/esx/esx_vi.c index d25f819bc5..3264afc13a 100644 --- a/src/esx/esx_vi.c +++ b/src/esx/esx_vi.c @@ -315,13 +315,13 @@ esxVI_CURL_Connect(esxVI_CURL *curl, esxUtil_ParsedUr= i *parsedUri) } =20 curl_easy_setopt(curl->handle, CURLOPT_USERAGENT, "libvirt-esx"); - curl_easy_setopt(curl->handle, CURLOPT_NOSIGNAL, 1); - curl_easy_setopt(curl->handle, CURLOPT_HEADER, 0); - curl_easy_setopt(curl->handle, CURLOPT_FOLLOWLOCATION, 0); + curl_easy_setopt(curl->handle, CURLOPT_NOSIGNAL, 1L); + curl_easy_setopt(curl->handle, CURLOPT_HEADER, 0L); + curl_easy_setopt(curl->handle, CURLOPT_FOLLOWLOCATION, 0L); curl_easy_setopt(curl->handle, CURLOPT_SSL_VERIFYPEER, - parsedUri->noVerify ? 0 : 1); + parsedUri->noVerify ? 0L : 1L); curl_easy_setopt(curl->handle, CURLOPT_SSL_VERIFYHOST, - parsedUri->noVerify ? 0 : 2); + parsedUri->noVerify ? 0L : 2L); curl_easy_setopt(curl->handle, CURLOPT_COOKIEFILE, ""); curl_easy_setopt(curl->handle, CURLOPT_HTTPHEADER, curl->headers); curl_easy_setopt(curl->handle, CURLOPT_READFUNCTION, @@ -331,16 +331,16 @@ esxVI_CURL_Connect(esxVI_CURL *curl, esxUtil_ParsedUr= i *parsedUri) curl_easy_setopt(curl->handle, CURLOPT_ERRORBUFFER, curl->error); #if ESX_VI__CURL__ENABLE_DEBUG_OUTPUT curl_easy_setopt(curl->handle, CURLOPT_DEBUGFUNCTION, esxVI_CURL_Debug= ); - curl_easy_setopt(curl->handle, CURLOPT_VERBOSE, 1); + curl_easy_setopt(curl->handle, CURLOPT_VERBOSE, 1L); #endif =20 if (parsedUri->proxy) { curl_easy_setopt(curl->handle, CURLOPT_PROXY, parsedUri->proxy_hostname); curl_easy_setopt(curl->handle, CURLOPT_PROXYTYPE, - parsedUri->proxy_type); + (long) parsedUri->proxy_type); curl_easy_setopt(curl->handle, CURLOPT_PROXYPORT, - parsedUri->proxy_port); + (long) parsedUri->proxy_port); } =20 if (parsedUri->cacert) @@ -386,8 +386,8 @@ esxVI_CURL_Download(esxVI_CURL *curl, const char *url, = char **content, curl_easy_setopt(curl->handle, CURLOPT_URL, url); curl_easy_setopt(curl->handle, CURLOPT_RANGE, range); curl_easy_setopt(curl->handle, CURLOPT_WRITEDATA, &buffer); - curl_easy_setopt(curl->handle, CURLOPT_UPLOAD, 0); - curl_easy_setopt(curl->handle, CURLOPT_HTTPGET, 1); + curl_easy_setopt(curl->handle, CURLOPT_UPLOAD, 0L); + curl_easy_setopt(curl->handle, CURLOPT_HTTPGET, 1L); =20 responseCode =3D esxVI_CURL_Perform(curl, url); } @@ -426,7 +426,7 @@ esxVI_CURL_Upload(esxVI_CURL *curl, const char *url, co= nst char *content) curl_easy_setopt(curl->handle, CURLOPT_URL, url); curl_easy_setopt(curl->handle, CURLOPT_RANGE, NULL); curl_easy_setopt(curl->handle, CURLOPT_READDATA, &content); - curl_easy_setopt(curl->handle, CURLOPT_UPLOAD, 1); + curl_easy_setopt(curl->handle, CURLOPT_UPLOAD, 1L); curl_easy_setopt(curl->handle, CURLOPT_INFILESIZE, strlen(content)= ); =20 responseCode =3D esxVI_CURL_Perform(curl, url); @@ -1223,7 +1223,7 @@ esxVI_Context_Execute(esxVI_Context *ctx, const char = *methodName, curl_easy_setopt(ctx->curl->handle, CURLOPT_URL, ctx->url); curl_easy_setopt(ctx->curl->handle, CURLOPT_RANGE, NULL); curl_easy_setopt(ctx->curl->handle, CURLOPT_WRITEDATA, &buffer); - curl_easy_setopt(ctx->curl->handle, CURLOPT_UPLOAD, 0); + curl_easy_setopt(ctx->curl->handle, CURLOPT_UPLOAD, 0L); curl_easy_setopt(ctx->curl->handle, CURLOPT_POSTFIELDS, request); curl_easy_setopt(ctx->curl->handle, CURLOPT_POSTFIELDSIZE, strlen(= request)); =20 --=20 2.50.1