classification
Title: Compiler warning in _ctypes_test.c
Type: compile error Stage: resolved
Components: ctypes Versions: Python 3.7, Python 3.6, Python 3.5
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: serhiy.storchaka, vinay.sajip, vstinner
Priority: normal Keywords:

Created on 2017-03-29 06:44 by serhiy.storchaka, last changed 2017-04-07 22:24 by vinay.sajip. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 902 merged benjamin.peterson, 2017-03-30 06:34
PR 1038 merged vinay.sajip, 2017-04-07 21:54
PR 1039 merged vinay.sajip, 2017-04-07 21:57
Messages (8)
msg290771 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2017-03-29 06:44
Compiler warning was introduced by issue29565.

/home/serhiy/py/cpython/Modules/_ctypes/_ctypes_test.c: In function ‘_testfunc_large_struct_update_value’:
/home/serhiy/py/cpython/Modules/_ctypes/_ctypes_test.c:53:42: warning: parameter ‘in’ set but not used [-Wunused-but-set-parameter]
 _testfunc_large_struct_update_value(Test in)
                                          ^
msg290778 - (view) Author: Vinay Sajip (vinay.sajip) * (Python committer) Date: 2017-03-29 11:25
Yes, this is on my radar. I'm planning to make some changes to this file in response to bpo-22273, and will stick in a (void) in to get rid of the warning.
msg291231 - (view) Author: Vinay Sajip (vinay.sajip) * (Python committer) Date: 2017-04-06 15:15
Should be fixed by 164d30e.
msg291232 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2017-04-06 15:16
Thanks Vinay!
msg291233 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2017-04-06 15:24
IHMO it's worth it to backport the fix, since Benjamin showed that GCC optimizer removes the function body and so defeat the purpose of the test.
msg291234 - (view) Author: Vinay Sajip (vinay.sajip) * (Python committer) Date: 2017-04-06 15:43
Added relevant "needs backport" tags to PR, will get to it soon. Reopening till then.
msg291304 - (view) Author: Vinay Sajip (vinay.sajip) * (Python committer) Date: 2017-04-07 22:23
New changeset d0d575a6db8cb3b2a720be9f404af3d754da9a5d by Vinay Sajip in branch '3.6':
bpo-29939: suppress compiler warnings in _ctypes_test (#1038)
https://github.com/python/cpython/commit/d0d575a6db8cb3b2a720be9f404af3d754da9a5d
msg291305 - (view) Author: Vinay Sajip (vinay.sajip) * (Python committer) Date: 2017-04-07 22:24
New changeset ae0915e42d8cd96e5ced1fc442ea078b4a59e82d by Vinay Sajip in branch '3.5':
Closes bpo-29939: suppress compiler warnings in _ctypes_test (#1039)
https://github.com/python/cpython/commit/ae0915e42d8cd96e5ced1fc442ea078b4a59e82d
History
Date User Action Args
2017-04-07 22:24:54vinay.sajipsetstatus: open -> closed

messages: + msg291305
2017-04-07 22:23:10vinay.sajipsetmessages: + msg291304
2017-04-07 21:57:51vinay.sajipsetpull_requests: + pull_request1192
2017-04-07 21:54:26vinay.sajipsetpull_requests: + pull_request1191
2017-04-06 15:43:19vinay.sajipsetstatus: closed -> open

messages: + msg291234
2017-04-06 15:24:23vstinnersetnosy: + vstinner
messages: + msg291233
2017-04-06 15:16:49serhiy.storchakasetmessages: + msg291232
2017-04-06 15:15:31vinay.sajipsetstatus: open -> closed
resolution: fixed
messages: + msg291231

stage: needs patch -> resolved
2017-03-30 06:34:34benjamin.petersonsetpull_requests: + pull_request802
2017-03-29 11:25:20vinay.sajipsetmessages: + msg290778
2017-03-29 06:44:44serhiy.storchakacreate