Skip to content

Conversation

@vszakats
Copy link
Member

@vszakats vszakats commented Feb 5, 2025

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

Seen with GCC 13 on Windows x86:
```
/home/runner/work/curl/curl/curl/lib/vssh/libssh.c: In function 'myssh_statemach_act':
/home/runner/work/curl/curl/curl/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
@vszakats vszakats changed the title libssh: silence -Wconversion libssh: silence -Wconversion with a cast Feb 5, 2025
@vszakats vszakats added the Windows Windows-specific label Feb 5, 2025
@vszakats vszakats changed the title libssh: silence -Wconversion with a cast libssh: silence -Wconversion with a cast (Windows 32-bit) Feb 5, 2025
@vszakats vszakats closed this in a0d3a32 Feb 5, 2025
@vszakats vszakats deleted the libssh-warn branch February 5, 2025 20:20
jay added a commit to jay/curl that referenced this pull request Mar 10, 2025
- Use ssh_scp_push_file64 instead of ssh_scp_push_file.

The former uses uint64_t for file size and the latter uses size_t which
may be 32-bit.

Ref: curl#16194

Closes #xxxx
@jay
Copy link
Member

jay commented Mar 10, 2025

@vszakats the warning seems legit, see #16641

jay added a commit that referenced this pull request Mar 10, 2025
- Use ssh_scp_push_file64 instead of ssh_scp_push_file.

The former uses uint64_t for file size and the latter uses size_t which
may be 32-bit.

Ref: #16194

Closes #16641
pps83 pushed a commit to pps83/curl that referenced this pull request Apr 26, 2025
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 curl#16194
pps83 pushed a commit to pps83/curl that referenced this pull request Apr 26, 2025
- Use ssh_scp_push_file64 instead of ssh_scp_push_file.

The former uses uint64_t for file size and the latter uses size_t which
may be 32-bit.

Ref: curl#16194

Closes curl#16641
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Development

Successfully merging this pull request may close these issues.

2 participants