From a0d3a32fba0f186b3ef401befec7950326575ad4 Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Wed, 5 Feb 2025 19:19:04 +0100 Subject: [PATCH] libssh: silence `-Wconversion` with a cast (Windows 32-bit) Seen with GCC 13 with Windows x86: ``` lib/vssh/libssh.c: In function 'myssh_statemach_act': lib/vssh/libssh.c:1851:41: error: conversion from 'curl_off_t' {aka 'long long int'} to 'size_t' {aka 'unsigned int'} may change value [-Werror=conversion] 1851 | data->state.infilesize, | ~~~~~~~~~~~^~~~~~~~~~~ ``` Ref: https://github.com/curl/curl/actions/runs/13161422041/job/36737994642?pr=16182#step:3:5111 Closes #16194 --- lib/vssh/libssh.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/vssh/libssh.c b/lib/vssh/libssh.c index 8d42ddd07c..7e2d1d7f19 100644 --- a/lib/vssh/libssh.c +++ b/lib/vssh/libssh.c @@ -1848,7 +1848,7 @@ static CURLcode myssh_statemach_act(struct Curl_easy *data, bool *block) } rc = ssh_scp_push_file(sshc->scp_session, protop->path, - data->state.infilesize, + (size_t)data->state.infilesize, (int)data->set.new_file_perms); if(rc != SSH_OK) { err_msg = ssh_get_error(sshc->ssh_session); -- 2.47.3