Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion Lib/pathlib/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -1222,7 +1222,8 @@ def chmod(self, mode, *, follow_symlinks=True):
"""
Change the permissions of the path, like os.chmod().
"""
os.chmod(self, mode, follow_symlinks=follow_symlinks)
# GH-127380: Force string path to ensure Windows archive bit handling works
os.chmod(str(self), mode, follow_symlinks=follow_symlinks)

def lchmod(self, mode):
"""
Expand Down
43 changes: 42 additions & 1 deletion Lib/test/test_pathlib/test_pathlib.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
import stat
import tempfile
import unittest
import subprocess
from unittest import mock
from urllib.request import pathname2url

Expand Down Expand Up @@ -3622,11 +3623,51 @@ def test_walk_symlink_location(self):
class PosixPathTest(PathTest, PurePosixPathTest):
cls = pathlib.PosixPath


@unittest.skipIf(os.name != 'nt', 'test requires a Windows-compatible system')
class WindowsPathTest(PathTest, PureWindowsPathTest):
cls = pathlib.WindowsPath

def test_chmod_archive_bit_behavior(self):

# gh-140774: Fix chmod failing to clear Read-Only if Archive bit is cleared.
base = self.cls(self.base)
filename = base / 'test_chmod_archive.txt'
filename.touch()

# Robust cleanup: Force write permission before deleting
def force_remove():
try:
os.chmod(filename, stat.S_IWRITE)
except OSError:
pass
try:
filename.unlink(missing_ok=True)
except OSError:
pass

self.addCleanup(force_remove)

def is_read_only(p):
try:
return (p.stat().st_file_attributes & stat.FILE_ATTRIBUTE_READONLY) > 0
except AttributeError:
return False

try:
# Case 1: Archive bit CLEARED, Read-Only SET
# We use the Windows 'attrib' command to manipulate the Archive bit directly
subprocess.run(['attrib', '-a', '+r', str(filename)], check=True, shell=True)

# Try to make it Writable (clearing the Read-Only flag)
filename.chmod(stat.S_IWRITE | stat.S_IREAD)

self.assertFalse(is_read_only(filename),
"chmod failed to clear Read-Only when Archive bit was cleared")

except subprocess.CalledProcessError:
self.skipTest("attrib command failed")
except FileNotFoundError:
self.skipTest("attrib command not found")

class PathSubclassTest(PathTest):
class cls(pathlib.Path):
Expand Down
5 changes: 5 additions & 0 deletions Modules/posixmodule.c
Original file line number Diff line number Diff line change
Expand Up @@ -3986,6 +3986,11 @@
}
if (mode & _S_IWRITE) {
attr &= ~FILE_ATTRIBUTE_READONLY;

if (attr == 0) {
/* gh-140774: If all attributes are cleared, set to NORMAL
to avoid failing to clear the Read-Only bit. */
attr = FILE_ATTRIBUTE_NORMAL;
}
else {
attr |= FILE_ATTRIBUTE_READONLY;
Expand All @@ -3995,9 +4000,9 @@

static int
win32_hchmod(HANDLE hfile, int mode)
{

Check failure on line 4003 in Modules/posixmodule.c

View workflow job for this annotation

GitHub Actions / Windows / Build and test (x64)

syntax error: missing ';' before '{' [D:\a\cpython\cpython\PCbuild\_freeze_module.vcxproj]

Check failure on line 4003 in Modules/posixmodule.c

View workflow job for this annotation

GitHub Actions / Windows (free-threading) / Build and test (x64)

syntax error: missing ';' before '{' [D:\a\cpython\cpython\PCbuild\_freeze_module.vcxproj]

Check failure on line 4003 in Modules/posixmodule.c

View workflow job for this annotation

GitHub Actions / Windows (free-threading) / Build and test (arm64)

syntax error: missing ';' before '{' [C:\a\cpython\cpython\PCbuild\_freeze_module.vcxproj]

Check failure on line 4003 in Modules/posixmodule.c

View workflow job for this annotation

GitHub Actions / Windows / Build and test (arm64)

syntax error: missing ';' before '{' [C:\a\cpython\cpython\PCbuild\_freeze_module.vcxproj]
FILE_BASIC_INFO info;
if (!GetFileInformationByHandleEx(hfile, FileBasicInfo,

Check warning on line 4005 in Modules/posixmodule.c

View workflow job for this annotation

GitHub Actions / Windows / Build and test (x64)

'GetFileInformationByHandleEx': pointer mismatch for actual parameter 1 [D:\a\cpython\cpython\PCbuild\_freeze_module.vcxproj]

Check failure on line 4005 in Modules/posixmodule.c

View workflow job for this annotation

GitHub Actions / Windows / Build and test (x64)

'hfile': undeclared identifier [D:\a\cpython\cpython\PCbuild\_freeze_module.vcxproj]

Check warning on line 4005 in Modules/posixmodule.c

View workflow job for this annotation

GitHub Actions / Windows (free-threading) / Build and test (x64)

'GetFileInformationByHandleEx': pointer mismatch for actual parameter 1 [D:\a\cpython\cpython\PCbuild\_freeze_module.vcxproj]

Check failure on line 4005 in Modules/posixmodule.c

View workflow job for this annotation

GitHub Actions / Windows (free-threading) / Build and test (x64)

'hfile': undeclared identifier [D:\a\cpython\cpython\PCbuild\_freeze_module.vcxproj]

Check warning on line 4005 in Modules/posixmodule.c

View workflow job for this annotation

GitHub Actions / Windows (free-threading) / Build and test (arm64)

'GetFileInformationByHandleEx': pointer mismatch for actual parameter 1 [C:\a\cpython\cpython\PCbuild\_freeze_module.vcxproj]

Check failure on line 4005 in Modules/posixmodule.c

View workflow job for this annotation

GitHub Actions / Windows (free-threading) / Build and test (arm64)

'hfile': undeclared identifier [C:\a\cpython\cpython\PCbuild\_freeze_module.vcxproj]

Check warning on line 4005 in Modules/posixmodule.c

View workflow job for this annotation

GitHub Actions / Windows / Build and test (arm64)

'GetFileInformationByHandleEx': pointer mismatch for actual parameter 1 [C:\a\cpython\cpython\PCbuild\_freeze_module.vcxproj]

Check failure on line 4005 in Modules/posixmodule.c

View workflow job for this annotation

GitHub Actions / Windows / Build and test (arm64)

'hfile': undeclared identifier [C:\a\cpython\cpython\PCbuild\_freeze_module.vcxproj]
&info, sizeof(info)))
{
return 0;
Expand All @@ -4008,14 +4013,14 @@
else {
info.FileAttributes |= FILE_ATTRIBUTE_READONLY;
}
return SetFileInformationByHandle(hfile, FileBasicInfo,

Check warning on line 4016 in Modules/posixmodule.c

View workflow job for this annotation

GitHub Actions / Windows / Build and test (x64)

'SetFileInformationByHandle': pointer mismatch for actual parameter 1 [D:\a\cpython\cpython\PCbuild\_freeze_module.vcxproj]

Check failure on line 4016 in Modules/posixmodule.c

View workflow job for this annotation

GitHub Actions / Windows / Build and test (x64)

'hfile': undeclared identifier [D:\a\cpython\cpython\PCbuild\_freeze_module.vcxproj]

Check warning on line 4016 in Modules/posixmodule.c

View workflow job for this annotation

GitHub Actions / Windows (free-threading) / Build and test (x64)

'SetFileInformationByHandle': pointer mismatch for actual parameter 1 [D:\a\cpython\cpython\PCbuild\_freeze_module.vcxproj]

Check failure on line 4016 in Modules/posixmodule.c

View workflow job for this annotation

GitHub Actions / Windows (free-threading) / Build and test (x64)

'hfile': undeclared identifier [D:\a\cpython\cpython\PCbuild\_freeze_module.vcxproj]

Check warning on line 4016 in Modules/posixmodule.c

View workflow job for this annotation

GitHub Actions / Windows (free-threading) / Build and test (arm64)

'SetFileInformationByHandle': pointer mismatch for actual parameter 1 [C:\a\cpython\cpython\PCbuild\_freeze_module.vcxproj]

Check failure on line 4016 in Modules/posixmodule.c

View workflow job for this annotation

GitHub Actions / Windows (free-threading) / Build and test (arm64)

'hfile': undeclared identifier [C:\a\cpython\cpython\PCbuild\_freeze_module.vcxproj]

Check warning on line 4016 in Modules/posixmodule.c

View workflow job for this annotation

GitHub Actions / Windows / Build and test (arm64)

'SetFileInformationByHandle': pointer mismatch for actual parameter 1 [C:\a\cpython\cpython\PCbuild\_freeze_module.vcxproj]

Check failure on line 4016 in Modules/posixmodule.c

View workflow job for this annotation

GitHub Actions / Windows / Build and test (arm64)

'hfile': undeclared identifier [C:\a\cpython\cpython\PCbuild\_freeze_module.vcxproj]
&info, sizeof(info));
}

static int
win32_fchmod(int fd, int mode)
{

Check failure on line 4022 in Modules/posixmodule.c

View workflow job for this annotation

GitHub Actions / Windows / Build and test (x64)

syntax error: missing ';' before '{' [D:\a\cpython\cpython\PCbuild\_freeze_module.vcxproj]

Check failure on line 4022 in Modules/posixmodule.c

View workflow job for this annotation

GitHub Actions / Windows (free-threading) / Build and test (x64)

syntax error: missing ';' before '{' [D:\a\cpython\cpython\PCbuild\_freeze_module.vcxproj]

Check failure on line 4022 in Modules/posixmodule.c

View workflow job for this annotation

GitHub Actions / Windows (free-threading) / Build and test (arm64)

syntax error: missing ';' before '{' [C:\a\cpython\cpython\PCbuild\_freeze_module.vcxproj]

Check failure on line 4022 in Modules/posixmodule.c

View workflow job for this annotation

GitHub Actions / Windows / Build and test (arm64)

syntax error: missing ';' before '{' [C:\a\cpython\cpython\PCbuild\_freeze_module.vcxproj]
HANDLE hfile = _Py_get_osfhandle_noraise(fd);

Check failure on line 4023 in Modules/posixmodule.c

View workflow job for this annotation

GitHub Actions / Windows / Build and test (x64)

'fd': undeclared identifier [D:\a\cpython\cpython\PCbuild\_freeze_module.vcxproj]

Check failure on line 4023 in Modules/posixmodule.c

View workflow job for this annotation

GitHub Actions / Windows (free-threading) / Build and test (x64)

'fd': undeclared identifier [D:\a\cpython\cpython\PCbuild\_freeze_module.vcxproj]

Check failure on line 4023 in Modules/posixmodule.c

View workflow job for this annotation

GitHub Actions / Windows (free-threading) / Build and test (arm64)

'fd': undeclared identifier [C:\a\cpython\cpython\PCbuild\_freeze_module.vcxproj]

Check failure on line 4023 in Modules/posixmodule.c

View workflow job for this annotation

GitHub Actions / Windows / Build and test (arm64)

'fd': undeclared identifier [C:\a\cpython\cpython\PCbuild\_freeze_module.vcxproj]
if (hfile == INVALID_HANDLE_VALUE) {
SetLastError(ERROR_INVALID_HANDLE);
return 0;
Expand Down Expand Up @@ -4065,7 +4070,7 @@
os_chmod_impl(PyObject *module, path_t *path, int mode, int dir_fd,
int follow_symlinks)
/*[clinic end generated code: output=5cf6a94915cc7bff input=fcf115d174b9f3d8]*/
{

Check failure on line 4073 in Modules/posixmodule.c

View workflow job for this annotation

GitHub Actions / Windows / Build and test (x64)

syntax error: missing ';' before '{' [D:\a\cpython\cpython\PCbuild\_freeze_module.vcxproj]

Check failure on line 4073 in Modules/posixmodule.c

View workflow job for this annotation

GitHub Actions / Windows (free-threading) / Build and test (x64)

syntax error: missing ';' before '{' [D:\a\cpython\cpython\PCbuild\_freeze_module.vcxproj]

Check failure on line 4073 in Modules/posixmodule.c

View workflow job for this annotation

GitHub Actions / Windows (free-threading) / Build and test (arm64)

syntax error: missing ';' before '{' [C:\a\cpython\cpython\PCbuild\_freeze_module.vcxproj]

Check failure on line 4073 in Modules/posixmodule.c

View workflow job for this annotation

GitHub Actions / Windows / Build and test (arm64)

syntax error: missing ';' before '{' [C:\a\cpython\cpython\PCbuild\_freeze_module.vcxproj]
int result;

#ifdef HAVE_FCHMODAT
Expand All @@ -4078,22 +4083,22 @@
return NULL;
#endif

if (PySys_Audit("os.chmod", "Oii", path->object, mode,

Check failure on line 4086 in Modules/posixmodule.c

View workflow job for this annotation

GitHub Actions / Windows / Build and test (x64)

left of '->object' must point to struct/union [D:\a\cpython\cpython\PCbuild\_freeze_module.vcxproj]

Check failure on line 4086 in Modules/posixmodule.c

View workflow job for this annotation

GitHub Actions / Windows (free-threading) / Build and test (x64)

left of '->object' must point to struct/union [D:\a\cpython\cpython\PCbuild\_freeze_module.vcxproj]

Check failure on line 4086 in Modules/posixmodule.c

View workflow job for this annotation

GitHub Actions / Windows (free-threading) / Build and test (arm64)

left of '->object' must point to struct/union [C:\a\cpython\cpython\PCbuild\_freeze_module.vcxproj]

Check failure on line 4086 in Modules/posixmodule.c

View workflow job for this annotation

GitHub Actions / Windows / Build and test (arm64)

left of '->object' must point to struct/union [C:\a\cpython\cpython\PCbuild\_freeze_module.vcxproj]
dir_fd == DEFAULT_DIR_FD ? -1 : dir_fd) < 0) {

Check failure on line 4087 in Modules/posixmodule.c

View workflow job for this annotation

GitHub Actions / Windows / Build and test (x64)

'dir_fd': undeclared identifier [D:\a\cpython\cpython\PCbuild\_freeze_module.vcxproj]

Check failure on line 4087 in Modules/posixmodule.c

View workflow job for this annotation

GitHub Actions / Windows / Build and test (x64)

'dir_fd': undeclared identifier [D:\a\cpython\cpython\PCbuild\_freeze_module.vcxproj]

Check failure on line 4087 in Modules/posixmodule.c

View workflow job for this annotation

GitHub Actions / Windows (free-threading) / Build and test (x64)

'dir_fd': undeclared identifier [D:\a\cpython\cpython\PCbuild\_freeze_module.vcxproj]

Check failure on line 4087 in Modules/posixmodule.c

View workflow job for this annotation

GitHub Actions / Windows (free-threading) / Build and test (x64)

'dir_fd': undeclared identifier [D:\a\cpython\cpython\PCbuild\_freeze_module.vcxproj]

Check failure on line 4087 in Modules/posixmodule.c

View workflow job for this annotation

GitHub Actions / Windows (free-threading) / Build and test (arm64)

'dir_fd': undeclared identifier [C:\a\cpython\cpython\PCbuild\_freeze_module.vcxproj]

Check failure on line 4087 in Modules/posixmodule.c

View workflow job for this annotation

GitHub Actions / Windows (free-threading) / Build and test (arm64)

'dir_fd': undeclared identifier [C:\a\cpython\cpython\PCbuild\_freeze_module.vcxproj]

Check failure on line 4087 in Modules/posixmodule.c

View workflow job for this annotation

GitHub Actions / Windows / Build and test (arm64)

'dir_fd': undeclared identifier [C:\a\cpython\cpython\PCbuild\_freeze_module.vcxproj]

Check failure on line 4087 in Modules/posixmodule.c

View workflow job for this annotation

GitHub Actions / Windows / Build and test (arm64)

'dir_fd': undeclared identifier [C:\a\cpython\cpython\PCbuild\_freeze_module.vcxproj]
return NULL;

Check warning on line 4088 in Modules/posixmodule.c

View workflow job for this annotation

GitHub Actions / Windows / Build and test (x64)

'return': 'int' differs in levels of indirection from 'void *' [D:\a\cpython\cpython\PCbuild\_freeze_module.vcxproj]

Check warning on line 4088 in Modules/posixmodule.c

View workflow job for this annotation

GitHub Actions / Windows (free-threading) / Build and test (x64)

'return': 'int' differs in levels of indirection from 'void *' [D:\a\cpython\cpython\PCbuild\_freeze_module.vcxproj]

Check warning on line 4088 in Modules/posixmodule.c

View workflow job for this annotation

GitHub Actions / Windows (free-threading) / Build and test (arm64)

'return': 'int' differs in levels of indirection from 'void *' [C:\a\cpython\cpython\PCbuild\_freeze_module.vcxproj]

Check warning on line 4088 in Modules/posixmodule.c

View workflow job for this annotation

GitHub Actions / Windows / Build and test (arm64)

'return': 'int' differs in levels of indirection from 'void *' [C:\a\cpython\cpython\PCbuild\_freeze_module.vcxproj]
}

#ifdef MS_WINDOWS
result = 0;
Py_BEGIN_ALLOW_THREADS
if (path->fd != -1) {

Check failure on line 4094 in Modules/posixmodule.c

View workflow job for this annotation

GitHub Actions / Windows / Build and test (x64)

left of '->fd' must point to struct/union [D:\a\cpython\cpython\PCbuild\_freeze_module.vcxproj]

Check failure on line 4094 in Modules/posixmodule.c

View workflow job for this annotation

GitHub Actions / Windows (free-threading) / Build and test (x64)

left of '->fd' must point to struct/union [D:\a\cpython\cpython\PCbuild\_freeze_module.vcxproj]

Check failure on line 4094 in Modules/posixmodule.c

View workflow job for this annotation

GitHub Actions / Windows (free-threading) / Build and test (arm64)

left of '->fd' must point to struct/union [C:\a\cpython\cpython\PCbuild\_freeze_module.vcxproj]

Check failure on line 4094 in Modules/posixmodule.c

View workflow job for this annotation

GitHub Actions / Windows / Build and test (arm64)

left of '->fd' must point to struct/union [C:\a\cpython\cpython\PCbuild\_freeze_module.vcxproj]
result = win32_fchmod(path->fd, mode);
}
else if (follow_symlinks) {
HANDLE hfile = CreateFileW(path->wide,
FILE_READ_ATTRIBUTES|FILE_WRITE_ATTRIBUTES,

Check warning on line 4099 in Modules/posixmodule.c

View workflow job for this annotation

GitHub Actions / Windows / Build and test (x64)

'CreateFileW': different types for formal and actual parameter 1 [D:\a\cpython\cpython\PCbuild\_freeze_module.vcxproj]

Check warning on line 4099 in Modules/posixmodule.c

View workflow job for this annotation

GitHub Actions / Windows / Build and test (x64)

'function': 'LPCWSTR' differs in levels of indirection from 'int' [D:\a\cpython\cpython\PCbuild\_freeze_module.vcxproj]

Check warning on line 4099 in Modules/posixmodule.c

View workflow job for this annotation

GitHub Actions / Windows (free-threading) / Build and test (x64)

'CreateFileW': different types for formal and actual parameter 1 [D:\a\cpython\cpython\PCbuild\_freeze_module.vcxproj]

Check warning on line 4099 in Modules/posixmodule.c

View workflow job for this annotation

GitHub Actions / Windows (free-threading) / Build and test (x64)

'function': 'LPCWSTR' differs in levels of indirection from 'int' [D:\a\cpython\cpython\PCbuild\_freeze_module.vcxproj]

Check warning on line 4099 in Modules/posixmodule.c

View workflow job for this annotation

GitHub Actions / Windows (free-threading) / Build and test (arm64)

'CreateFileW': different types for formal and actual parameter 1 [C:\a\cpython\cpython\PCbuild\_freeze_module.vcxproj]

Check warning on line 4099 in Modules/posixmodule.c

View workflow job for this annotation

GitHub Actions / Windows (free-threading) / Build and test (arm64)

'function': 'LPCWSTR' differs in levels of indirection from 'int' [C:\a\cpython\cpython\PCbuild\_freeze_module.vcxproj]

Check warning on line 4099 in Modules/posixmodule.c

View workflow job for this annotation

GitHub Actions / Windows / Build and test (arm64)

'CreateFileW': different types for formal and actual parameter 1 [C:\a\cpython\cpython\PCbuild\_freeze_module.vcxproj]

Check warning on line 4099 in Modules/posixmodule.c

View workflow job for this annotation

GitHub Actions / Windows / Build and test (arm64)

'function': 'LPCWSTR' differs in levels of indirection from 'int' [C:\a\cpython\cpython\PCbuild\_freeze_module.vcxproj]
0, NULL,

Check warning on line 4100 in Modules/posixmodule.c

View workflow job for this annotation

GitHub Actions / Windows / Build and test (x64)

'CreateFileW': different types for formal and actual parameter 3 [D:\a\cpython\cpython\PCbuild\_freeze_module.vcxproj]

Check warning on line 4100 in Modules/posixmodule.c

View workflow job for this annotation

GitHub Actions / Windows / Build and test (x64)

'function': 'DWORD' differs in levels of indirection from 'void *' [D:\a\cpython\cpython\PCbuild\_freeze_module.vcxproj]

Check warning on line 4100 in Modules/posixmodule.c

View workflow job for this annotation

GitHub Actions / Windows (free-threading) / Build and test (x64)

'CreateFileW': different types for formal and actual parameter 3 [D:\a\cpython\cpython\PCbuild\_freeze_module.vcxproj]

Check warning on line 4100 in Modules/posixmodule.c

View workflow job for this annotation

GitHub Actions / Windows (free-threading) / Build and test (x64)

'function': 'DWORD' differs in levels of indirection from 'void *' [D:\a\cpython\cpython\PCbuild\_freeze_module.vcxproj]

Check warning on line 4100 in Modules/posixmodule.c

View workflow job for this annotation

GitHub Actions / Windows (free-threading) / Build and test (arm64)

'CreateFileW': different types for formal and actual parameter 3 [C:\a\cpython\cpython\PCbuild\_freeze_module.vcxproj]

Check warning on line 4100 in Modules/posixmodule.c

View workflow job for this annotation

GitHub Actions / Windows (free-threading) / Build and test (arm64)

'function': 'DWORD' differs in levels of indirection from 'void *' [C:\a\cpython\cpython\PCbuild\_freeze_module.vcxproj]

Check warning on line 4100 in Modules/posixmodule.c

View workflow job for this annotation

GitHub Actions / Windows / Build and test (arm64)

'CreateFileW': different types for formal and actual parameter 3 [C:\a\cpython\cpython\PCbuild\_freeze_module.vcxproj]

Check warning on line 4100 in Modules/posixmodule.c

View workflow job for this annotation

GitHub Actions / Windows / Build and test (arm64)

'function': 'DWORD' differs in levels of indirection from 'void *' [C:\a\cpython\cpython\PCbuild\_freeze_module.vcxproj]
OPEN_EXISTING, FILE_FLAG_BACKUP_SEMANTICS, NULL);

Check warning on line 4101 in Modules/posixmodule.c

View workflow job for this annotation

GitHub Actions / Windows / Build and test (x64)

'function': 'DWORD' differs in levels of indirection from 'void *' [D:\a\cpython\cpython\PCbuild\_freeze_module.vcxproj]

Check warning on line 4101 in Modules/posixmodule.c

View workflow job for this annotation

GitHub Actions / Windows / Build and test (x64)

'CreateFileW': different types for formal and actual parameter 4 [D:\a\cpython\cpython\PCbuild\_freeze_module.vcxproj]

Check warning on line 4101 in Modules/posixmodule.c

View workflow job for this annotation

GitHub Actions / Windows / Build and test (x64)

'function': 'LPSECURITY_ATTRIBUTES' differs in levels of indirection from 'int' [D:\a\cpython\cpython\PCbuild\_freeze_module.vcxproj]

Check warning on line 4101 in Modules/posixmodule.c

View workflow job for this annotation

GitHub Actions / Windows (free-threading) / Build and test (x64)

'function': 'DWORD' differs in levels of indirection from 'void *' [D:\a\cpython\cpython\PCbuild\_freeze_module.vcxproj]

Check warning on line 4101 in Modules/posixmodule.c

View workflow job for this annotation

GitHub Actions / Windows (free-threading) / Build and test (x64)

'CreateFileW': different types for formal and actual parameter 4 [D:\a\cpython\cpython\PCbuild\_freeze_module.vcxproj]

Check warning on line 4101 in Modules/posixmodule.c

View workflow job for this annotation

GitHub Actions / Windows (free-threading) / Build and test (x64)

'function': 'LPSECURITY_ATTRIBUTES' differs in levels of indirection from 'int' [D:\a\cpython\cpython\PCbuild\_freeze_module.vcxproj]

Check warning on line 4101 in Modules/posixmodule.c

View workflow job for this annotation

GitHub Actions / Windows (free-threading) / Build and test (arm64)

'function': 'DWORD' differs in levels of indirection from 'void *' [C:\a\cpython\cpython\PCbuild\_freeze_module.vcxproj]

Check warning on line 4101 in Modules/posixmodule.c

View workflow job for this annotation

GitHub Actions / Windows (free-threading) / Build and test (arm64)

'CreateFileW': different types for formal and actual parameter 4 [C:\a\cpython\cpython\PCbuild\_freeze_module.vcxproj]

Check warning on line 4101 in Modules/posixmodule.c

View workflow job for this annotation

GitHub Actions / Windows (free-threading) / Build and test (arm64)

'function': 'LPSECURITY_ATTRIBUTES' differs in levels of indirection from 'int' [C:\a\cpython\cpython\PCbuild\_freeze_module.vcxproj]

Check warning on line 4101 in Modules/posixmodule.c

View workflow job for this annotation

GitHub Actions / Windows / Build and test (arm64)

'function': 'DWORD' differs in levels of indirection from 'void *' [C:\a\cpython\cpython\PCbuild\_freeze_module.vcxproj]

Check warning on line 4101 in Modules/posixmodule.c

View workflow job for this annotation

GitHub Actions / Windows / Build and test (arm64)

'CreateFileW': different types for formal and actual parameter 4 [C:\a\cpython\cpython\PCbuild\_freeze_module.vcxproj]

Check warning on line 4101 in Modules/posixmodule.c

View workflow job for this annotation

GitHub Actions / Windows / Build and test (arm64)

'function': 'LPSECURITY_ATTRIBUTES' differs in levels of indirection from 'int' [C:\a\cpython\cpython\PCbuild\_freeze_module.vcxproj]
if (hfile != INVALID_HANDLE_VALUE) {
result = win32_hchmod(hfile, mode);
(void)CloseHandle(hfile);
Expand Down
Loading