Skip to content

GH-131296: fix clang-cl warnings in fileutils.c #131301

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from

Conversation

chris-eibl
Copy link
Member

@chris-eibl chris-eibl commented Mar 15, 2025

@@ -129,7 +130,7 @@ is_valid_wide_char(wchar_t ch)
// Reject lone surrogate characters
return 0;
}
if (ch > MAX_UNICODE) {
if (sizeof(ch) > 2 && ch > MAX_UNICODE) {
Copy link
Member Author

Choose a reason for hiding this comment

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

Fix warning : result of comparison of constant 1114111 with expression of type 'wchar_t' (aka 'unsigned short') is always false [-Wtautological-constant-out-of-range-compare]

@@ -55,8 +55,9 @@ int _Py_open_cloexec_works = -1;

// mbstowcs() and mbrtowc() errors
static const size_t DECODE_ERROR = ((size_t)-1);
#ifdef HAVE_MBRTOWC
Copy link
Member Author

Choose a reason for hiding this comment

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

fix warning : unused variable 'INCOMPLETE_CHARACTER' [-Wunused-const-variable]

@chris-eibl chris-eibl closed this Mar 20, 2025
@chris-eibl
Copy link
Member Author

Closed because done similarily in #131487.

@chris-eibl chris-eibl deleted the fix_clangcl_fileutils branch March 20, 2025 15:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant