Title: gh-111178: Avoid calling functions from incompatible pointer types in _tkinter.c by chrstphrchvz · Pull Request #112893 · python/cpython · GitHub
Open Graph Title: gh-111178: Avoid calling functions from incompatible pointer types in _tkinter.c by chrstphrchvz · Pull Request #112893 · python/cpython
X Title: gh-111178: Avoid calling functions from incompatible pointer types in _tkinter.c by chrstphrchvz · Pull Request #112893 · python/cpython
Description: Potential compiler warnings eliminated: ./Modules/_tkinter.c:819:18: warning: cast from 'PyObject *(*)(PyTclObject *, void *)' (aka 'struct _object *(*)(PyTclObject *, void *)') to 'getter' (aka 'struct _object *(*)(struct _object *, void *)') converts to incompatible function type [-Wcast-function-type-strict] 819 | {"typename", (getter)get_typename, NULL, get_typename__doc__}, | ^~~~~~~~~~~~~~~~~~~~ ./Modules/_tkinter.c:820:16: warning: cast from 'PyObject *(*)(PyTclObject *, void *)' (aka 'struct _object *(*)(PyTclObject *, void *)') to 'getter' (aka 'struct _object *(*)(struct _object *, void *)') converts to incompatible function type [-Wcast-function-type-strict] 820 | {"string", (getter)PyTclObject_string, NULL, | ^~~~~~~~~~~~~~~~~~~~~~~~~~ ./Modules/_tkinter.c:826:21: warning: cast from 'void (*)(PyTclObject *)' to 'destructor' (aka 'void (*)(struct _object *)') converts to incompatible function type [-Wcast-function-type-strict] 826 | {Py_tp_dealloc, (destructor)PyTclObject_dealloc}, | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ./Modules/_tkinter.c:827:18: warning: cast from 'PyObject *(*)(PyTclObject *)' (aka 'struct _object *(*)(PyTclObject *)') to 'reprfunc' (aka 'struct _object *(*)(struct _object *)') converts to incompatible function type [-Wcast-function-type-strict] 827 | {Py_tp_repr, (reprfunc)PyTclObject_repr}, | ^~~~~~~~~~~~~~~~~~~~~~~~~~ ./Modules/_tkinter.c:828:17: warning: cast from 'PyObject *(*)(PyTclObject *)' (aka 'struct _object *(*)(PyTclObject *)') to 'reprfunc' (aka 'struct _object *(*)(struct _object *)') converts to incompatible function type [-Wcast-function-type-strict] 828 | {Py_tp_str, (reprfunc)PyTclObject_str}, | ^~~~~~~~~~~~~~~~~~~~~~~~~ ./Modules/_tkinter.c:1388:23: warning: cast from 'int (*)(Tkapp_CallEvent *, int)' (aka 'int (*)(struct Tkapp_CallEvent *, int)') to 'Tcl_EventProc *' (aka 'int (*)(struct Tcl_Event *, int)') converts to incompatible function type [-Wcast-function-type-strict] 1388 | ev->ev.proc = (Tcl_EventProc*)Tkapp_CallProc; | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ./Modules/_tkinter.c:1666:23: warning: cast from 'int (*)(VarEvent *, int)' (aka 'int (*)(struct VarEvent *, int)') to 'Tcl_EventProc *' (aka 'int (*)(struct Tcl_Event *, int)') converts to incompatible function type [-Wcast-function-type-strict] 1666 | ev->ev.proc = (Tcl_EventProc*)var_proc; | ^~~~~~~~~~~~~~~~~~~~~~~~ ./Modules/_tkinter.c:2293:23: warning: cast from 'int (*)(CommandEvent *, int)' (aka 'int (*)(struct CommandEvent *, int)') to 'Tcl_EventProc *' (aka 'int (*)(struct Tcl_Event *, int)') converts to incompatible function type [-Wcast-function-type-strict] 2293 | ev->ev.proc = (Tcl_EventProc*)Tkapp_CommandProc; | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ./Modules/_tkinter.c:2346:23: warning: cast from 'int (*)(CommandEvent *, int)' (aka 'int (*)(struct CommandEvent *, int)') to 'Tcl_EventProc *' (aka 'int (*)(struct Tcl_Event *, int)') converts to incompatible function type [-Wcast-function-type-strict] 2346 | ev->ev.proc = (Tcl_EventProc*)Tkapp_CommandProc; | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Issue: gh-111178
Open Graph Description: Potential compiler warnings eliminated: ./Modules/_tkinter.c:819:18: warning: cast from 'PyObject *(*)(PyTclObject *, void *)' (aka 'struct _object *(*)(PyTclObject *, void *)') to ...
X Description: Potential compiler warnings eliminated: ./Modules/_tkinter.c:819:18: warning: cast from 'PyObject *(*)(PyTclObject *, void *)' (aka 'struct _object *(*)(PyTclObject *, void ...
Opengraph URL: https://github.com/python/cpython/pull/112893
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:85907882-e54d-9de9-d67e-36c5253fd538 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | D08E:84862:C21CF7:1102E5D:696A2AE1 |
| html-safe-nonce | b7011f33ac543fb2a1ebe7dde5f6427c9db8cc33c109370e00488e653b6a8f60 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEMDhFOjg0ODYyOkMyMUNGNzoxMTAyRTVEOjY5NkEyQUUxIiwidmlzaXRvcl9pZCI6IjY2NjQ0NDYzNTM2NTMyMTQ0MSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | f2202af89a3503c0497d7bd0e823215628dd2fcde8496c53b906b42b6a34b1c4 |
| hovercard-subject-tag | pull_request:1637104400 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/python/cpython/pull/112893/files |
| twitter:image | https://avatars.githubusercontent.com/u/7941193?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/7941193?s=400&v=4 |
| og:image:alt | Potential compiler warnings eliminated: ./Modules/_tkinter.c:819:18: warning: cast from 'PyObject *(*)(PyTclObject *, void *)' (aka 'struct _object *(*)(PyTclObject *, void *)') to ... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | a1022f03e4f0d91ea173e4e5dac892c982e0588c62f1ce56121d755a320a3569 |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/python/cpython git https://github.com/python/cpython.git |
| octolytics-dimension-user_id | 1525981 |
| octolytics-dimension-user_login | python |
| octolytics-dimension-repository_id | 81598961 |
| octolytics-dimension-repository_nwo | python/cpython |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 81598961 |
| octolytics-dimension-repository_network_root_nwo | python/cpython |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | f472b8e6c7b3fdd5d0354972a3f4c516289bf0be |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width