Skip to content

Conversation

tgauth
Copy link
Collaborator

@tgauth tgauth commented Sep 10, 2025

PR Summary

  • fix a few comp. warnings

@tgauth
Copy link
Collaborator Author

tgauth commented Sep 10, 2025

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

Copy link

@Copilot 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

This PR fixes several compiler warnings related to type mismatches and unsafe function usage in the Windows compatibility layer.

  • Changed variable types from int to size_t to fix signed/unsigned comparison warnings
  • Replaced deprecated getenv() with secure _dupenv_s() function to fix security warnings
  • Added explicit casting to resolve integer comparison warnings

Reviewed Changes

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

File Description
contrib/win32/win32compat/win32_dirent.c Changed path_len from int to size_t to match pointer arithmetic result type
contrib/win32/win32compat/w32fd.c Replaced getenv() with _dupenv_s() and added length check for safer environment variable access
contrib/win32/win32compat/misc.c Added explicit cast to int to fix signed/unsigned comparison warning
contrib/win32/win32compat/fileio.c Changed loop variable from int to size_t to match bytes_to_copy parameter type

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@tgauth
Copy link
Collaborator Author

tgauth commented Sep 11, 2025

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@tgauth tgauth merged commit 6958bcc into PowerShell:latestw_all Sep 15, 2025
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants