Skip to content

libssh: fix -Wsign-compare in 32-bit builds by dropping a redundant check#21225

Closed
vszakats wants to merge 10 commits intocurl:masterfrom
vszakats:castrevert
Closed

libssh: fix -Wsign-compare in 32-bit builds by dropping a redundant check#21225
vszakats wants to merge 10 commits intocurl:masterfrom
vszakats:castrevert

Conversation

@vszakats
Copy link
Copy Markdown
Member

@vszakats vszakats commented Apr 5, 2026

Follow-up to 8c8eeba #21214 (wrong silencing)
Follow-up to c049c37 #18989 (add redundant check)
Follow-up to c988ec9 #9328 (make check fail)
Follow-up to 44a02d2 #9324 (add original check)

@vszakats vszakats marked this pull request as draft April 5, 2026 09:34
@github-actions github-actions bot added the CI Continuous Integration label Apr 5, 2026
@vszakats vszakats changed the title Revert "libssh: fix -Wsign-compare in 32-bit builds" libssh: fix -Wsign-compare in 32-bit builds (correction) Apr 5, 2026
@vszakats vszakats marked this pull request as ready for review April 5, 2026 10:04
@vszakats vszakats requested a review from Copilot April 5, 2026 10:04
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Follow-up correction for the libssh SFTP atime/mtime quote handling to avoid -Wsign-compare failures on 32-bit Windows builds, and to ensure CI covers the affected configuration.

Changes:

  • Adjusted the time_t vs UINT_MAX comparison/capping logic in myssh_in_SFTP_QUOTE_STAT() to avoid signedness warnings.
  • Extended Windows CI matrix to include a MinGW32 (i686) cmake+GnuTLS+libssh build to catch 32-bit issues.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
lib/vssh/libssh.c Updates atime/mtime quote timestamp bounds logic to avoid sign-compare on 32-bit builds.
.github/workflows/windows.yml Adds a MinGW32 i686 “gnutls libssh” build to CI matrix for 32-bit coverage.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@vszakats vszakats marked this pull request as draft April 5, 2026 10:24
@vszakats
Copy link
Copy Markdown
Member Author

vszakats commented Apr 5, 2026

D:/a/curl/curl/lib/vssh/libssh.c:1664:38: error: comparison is always false due to limited range of data type [-Werror=type-limits]
 1664 |     if(date >= 0 && (curl_off_t)date > (curl_off_t)UINT_MAX)
      |                                      ^

@vszakats vszakats changed the title libssh: fix -Wsign-compare in 32-bit builds (correction) libssh: fix -Wsign-compare in 32-bit builds by dropping a redundant check Apr 5, 2026
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@vszakats vszakats marked this pull request as ready for review April 5, 2026 11:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CI Continuous Integration SCP/SFTP

Development

Successfully merging this pull request may close these issues.

3 participants