From: Viktor Szakats Date: Wed, 5 Feb 2025 18:19:04 +0000 (+0100) Subject: libssh: silence `-Wconversion` with a cast (Windows 32-bit) X-Git-Tag: curl-8_12_1~92 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a0d3a32fba0f186b3ef401befec7950326575ad4;p=thirdparty%2Fcurl.git 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 --- 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);