libssh: silence -Wconversion with a cast (Windows 32-bit)#16194
Closed
vszakats wants to merge 1 commit intocurl:masterfrom
Closed
libssh: silence -Wconversion with a cast (Windows 32-bit)#16194vszakats wants to merge 1 commit intocurl:masterfrom
-Wconversion with a cast (Windows 32-bit)#16194vszakats wants to merge 1 commit intocurl:masterfrom
Conversation
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
-Wconversion-Wconversion with a cast
-Wconversion with a cast-Wconversion with a cast (Windows 32-bit)
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
Member
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Seen with GCC 13 with Windows x86:
Ref: https://github.com/curl/curl/actions/runs/13161422041/job/36737994642?pr=16182#step:3:5111