Skip to content

Conversation

@vstinner
Copy link
Member

@vstinner vstinner commented Nov 5, 2025

Example of fixed warnings on 32-bit Windows:

Python\remote_debugging.c(24,53): warning C4244: 'function':
conversion from 'uint64_t' to 'uintptr_t', possible loss of data

Modules\_remote_debugging_module.c(789,44): warning C4244:
'function': conversion from 'uint64_t' to 'size_t', possible loss
of data

Example of fixed warnings on 32-bit Windows:

    Python\remote_debugging.c(24,53): warning C4244: 'function':
    conversion from 'uint64_t' to 'uintptr_t', possible loss of data

    Modules\_remote_debugging_module.c(789,44): warning C4244:
    'function': conversion from 'uint64_t' to 'size_t', possible loss
    of data
@vstinner
Copy link
Member Author

vstinner commented Nov 5, 2025

Fix the warnings: https://github.com/python/cpython/actions/runs/19099585285/job/54567997909

         D:\a\cpython\cpython\Python\remote_debugging.c(24,53): warning C4244: 'function': conversion from 'uint64_t' to 'uintptr_t', possible loss of data [D:\a\cpython\cpython\PCbuild\pythoncore.vcxproj]


       "D:\a\cpython\cpython\PCbuild\pcbuild.proj" (Build target) (1) ->
       "D:\a\cpython\cpython\PCbuild\_remote_debugging.vcxproj" (Build target) (30) ->
         D:\a\cpython\cpython\Modules\_remote_debugging_module.c(506,44): warning C4244: 'function': conversion from 'uint64_t' to 'uintptr_t', possible loss of data [D:\a\cpython\cpython\PCbuild\_remote_debugging.vcxproj]
         D:\a\cpython\cpython\Modules\_remote_debugging_module.c(517,39): warning C4244: 'function': conversion from 'uint64_t' to 'uintptr_t', possible loss of data [D:\a\cpython\cpython\PCbuild\_remote_debugging.vcxproj]
         D:\a\cpython\cpython\Modules\_remote_debugging_module.c(533,39): warning C4244: 'function': conversion from 'uint64_t' to 'uintptr_t', possible loss of data [D:\a\cpython\cpython\PCbuild\_remote_debugging.vcxproj]
         D:\a\cpython\cpython\Modules\_remote_debugging_module.c(689,59): warning C4244: 'initializing': conversion from 'uint64_t' to 'size_t', possible loss of data [D:\a\cpython\cpython\PCbuild\_remote_debugging.vcxproj]
         D:\a\cpython\cpython\Modules\_remote_debugging_module.c(751,57): warning C4244: 'initializing': conversion from 'uint64_t' to 'size_t', possible loss of data [D:\a\cpython\cpython\PCbuild\_remote_debugging.vcxproj]
         D:\a\cpython\cpython\Modules\_remote_debugging_module.c(789,44): warning C4244: 'function': conversion from 'uint64_t' to 'size_t', possible loss of data [D:\a\cpython\cpython\PCbuild\_remote_debugging.vcxproj]
         D:\a\cpython\cpython\Modules\_remote_debugging_module.c(826,21): warning C4244: 'function': conversion from 'uint64_t' to 'uintptr_t', possible loss of data [D:\a\cpython\cpython\PCbuild\_remote_debugging.vcxproj]
         D:\a\cpython\cpython\Modules\_remote_debugging_module.c(936,58): warning C4244: 'function': conversion from 'uint64_t' to 'size_t', possible loss of data [D:\a\cpython\cpython\PCbuild\_remote_debugging.vcxproj]
         D:\a\cpython\cpython\Modules\_remote_debugging_module.c(1043,31): warning C4244: 'function': conversion from 'uint64_t' to 'uintptr_t', possible loss of data [D:\a\cpython\cpython\PCbuild\_remote_debugging.vcxproj]
         D:\a\cpython\cpython\Modules\_remote_debugging_module.c(1104,45): warning C4244: 'initializing': conversion from 'uint64_t' to 'uintptr_t', possible loss of data [D:\a\cpython\cpython\PCbuild\_remote_debugging.vcxproj]
         D:\a\cpython\cpython\Modules\_remote_debugging_module.c(1156,96): warning C4244: 'function': conversion from 'uint64_t' to 'size_t', possible loss of data [D:\a\cpython\cpython\PCbuild\_remote_debugging.vcxproj]
         D:\a\cpython\cpython\Modules\_remote_debugging_module.c(1209,22): warning C4244: 'function': conversion from 'uint64_t' to 'uintptr_t', possible loss of data [D:\a\cpython\cpython\PCbuild\_remote_debugging.vcxproj]
         D:\a\cpython\cpython\Modules\_remote_debugging_module.c(1357,45): warning C4244: 'initializing': conversion from 'uint64_t' to 'uintptr_t', possible loss of data [D:\a\cpython\cpython\PCbuild\_remote_debugging.vcxproj]
         D:\a\cpython\cpython\Modules\_remote_debugging_module.c(1372,96): warning C4244: 'function': conversion from 'uint64_t' to 'size_t', possible loss of data [D:\a\cpython\cpython\PCbuild\_remote_debugging.vcxproj]
         D:\a\cpython\cpython\Modules\_remote_debugging_module.c(1529,27): warning C4244: 'function': conversion from 'uint64_t' to 'uintptr_t', possible loss of data [D:\a\cpython\cpython\PCbuild\_remote_debugging.vcxproj]
         D:\a\cpython\cpython\Modules\_remote_debugging_module.c(1543,27): warning C4244: 'function': conversion from 'uint64_t' to 'uintptr_t', possible loss of data [D:\a\cpython\cpython\PCbuild\_remote_debugging.vcxproj]
         D:\a\cpython\cpython\Modules\_remote_debugging_module.c(1559,19): warning C4244: 'function': conversion from 'uint64_t' to 'uintptr_t', possible loss of data [D:\a\cpython\cpython\PCbuild\_remote_debugging.vcxproj]
         D:\a\cpython\cpython\Modules\_remote_debugging_module.c(1575,27): warning C4244: 'function': conversion from 'uint64_t' to 'uintptr_t', possible loss of data [D:\a\cpython\cpython\PCbuild\_remote_debugging.vcxproj]
         D:\a\cpython\cpython\Modules\_remote_debugging_module.c(1753,35): warning C4244: 'initializing': conversion from 'uint64_t' to 'uintptr_t', possible loss of data [D:\a\cpython\cpython\PCbuild\_remote_debugging.vcxproj]
         D:\a\cpython\cpython\Modules\_remote_debugging_module.c(1873,49): warning C4244: '=': conversion from 'uint64_t' to 'uintptr_t', possible loss of data [D:\a\cpython\cpython\PCbuild\_remote_debugging.vcxproj]
         D:\a\cpython\cpython\Modules\_remote_debugging_module.c(2040,40): warning C4244: 'function': conversion from 'uint64_t' to 'uintptr_t', possible loss of data [D:\a\cpython\cpython\PCbuild\_remote_debugging.vcxproj]
         D:\a\cpython\cpython\Modules\_remote_debugging_module.c(2155,35): warning C4244: 'function': conversion from 'uint64_t' to 'uintptr_t', possible loss of data [D:\a\cpython\cpython\PCbuild\_remote_debugging.vcxproj]
         D:\a\cpython\cpython\Modules\_remote_debugging_module.c(2176,64): warning C4244: 'initializing': conversion from 'uint64_t' to 'uintptr_t', possible loss of data [D:\a\cpython\cpython\PCbuild\_remote_debugging.vcxproj]
         D:\a\cpython\cpython\Modules\_remote_debugging_module.c(2201,31): warning C4244: 'function': conversion from 'uint64_t' to 'uintptr_t', possible loss of data [D:\a\cpython\cpython\PCbuild\_remote_debugging.vcxproj]
         D:\a\cpython\cpython\Modules\_remote_debugging_module.c(2373,13): warning C4244: 'initializing': conversion from 'uint64_t' to 'uintptr_t', possible loss of data [D:\a\cpython\cpython\PCbuild\_remote_debugging.vcxproj]
         D:\a\cpython\cpython\Modules\_remote_debugging_module.c(2608,30): warning C4018: '<': signed/unsigned mismatch [D:\a\cpython\cpython\PCbuild\_remote_debugging.vcxproj]
         D:\a\cpython\cpython\Modules\_remote_debugging_module.c(2645,81): warning C4244: 'function': conversion from 'uint64_t' to 'size_t', possible loss of data [D:\a\cpython\cpython\PCbuild\_remote_debugging.vcxproj]
         D:\a\cpython\cpython\Modules\_remote_debugging_module.c(3177,9): warning C4244: 'initializing': conversion from 'uint64_t' to 'uintptr_t', possible loss of data [D:\a\cpython\cpython\PCbuild\_remote_debugging.vcxproj]

@vstinner vstinner marked this pull request as ready for review November 5, 2025 17:49
@vstinner vstinner merged commit f458ac0 into python:main Nov 5, 2025
50 checks passed
@vstinner vstinner deleted the fix_remove_debugging_warns branch November 5, 2025 19:18
@vstinner vstinner added the needs backport to 3.14 bugs and security fixes label Nov 5, 2025
@miss-islington-app
Copy link

Thanks @vstinner for the PR 🌮🎉.. I'm working now to backport this PR to: 3.14.
🐍🍒⛏🤖

@miss-islington-app
Copy link

Sorry, @vstinner, I could not cleanly backport this to 3.14 due to a conflict.
Please backport using cherry_picker on command line.

cherry_picker f458ac01ba522cc7f94c0c0ee9a00c82f1be6d69 3.14

@bedevere-app
Copy link

bedevere-app bot commented Nov 5, 2025

GH-141067 is a backport of this pull request to the 3.14 branch.

@bedevere-app bedevere-app bot removed the needs backport to 3.14 bugs and security fixes label Nov 5, 2025
vstinner added a commit to vstinner/cpython that referenced this pull request Nov 5, 2025
Example of fixed warnings on 32-bit Windows:

    Python\remote_debugging.c(24,53): warning C4244: 'function':
    conversion from 'uint64_t' to 'uintptr_t', possible loss of data

    Modules\_remote_debugging_module.c(789,44): warning C4244:
    'function': conversion from 'uint64_t' to 'size_t', possible loss
    of data

(cherry picked from commit f458ac0)
vstinner added a commit that referenced this pull request Nov 5, 2025
Fix compiler warnings in remote debugging (#141060)

Example of fixed warnings on 32-bit Windows:

    Python\remote_debugging.c(24,53): warning C4244: 'function':
    conversion from 'uint64_t' to 'uintptr_t', possible loss of data

    Modules\_remote_debugging_module.c(789,44): warning C4244:
    'function': conversion from 'uint64_t' to 'size_t', possible loss
    of data

(cherry picked from commit f458ac0)
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.

2 participants