Title: Compiler warninig: warning: variable ‘res’ set but not used [-Wunused-but-set-variable]
Type: enhancement Stage: resolved
Components: Versions: Python 3.9
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: corona10, serhiy.storchaka, shihai1991
Priority: normal Keywords: patch

Created on 2020-03-04 15:08 by corona10, last changed 2020-04-20 16:50 by corona10. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 19615 closed shihai1991, 2020-04-20 05:19
PR 19623 merged shihai1991, 2020-04-20 15:15
Messages (4)
msg363355 - (view) Author: Dong-hee Na (corona10) * (Python committer) Date: 2020-03-04 15:08
Modules/_testcapimodule.c:6808:15: warning: variable ‘res’ set but not used [-Wunused-but-set-variable]
 6808 |     PyObject *res;

This warning is noticed after bpo-38913 is fixed.

My GCC version is 9.2.0 :)
msg366809 - (view) Author: hai shi (shihai1991) * (Python triager) Date: 2020-04-20 05:23
I found this warning too(ps: my gcc is 9.3.0 ;)
Can we add a inner macro like `_unused(var) (void) var`? 
Hi, serhiy, can you give us some advice?
msg366855 - (view) Author: Dong-hee Na (corona10) * (Python committer) Date: 2020-04-20 16:49
New changeset 5dd21f5d1c9b5a9316deca4535932675f04efeee by Hai Shi in branch 'master':
bpo-39849: Enable assertions in _testcapimodule.c and _testinternalcapi.c (GH-19623)
msg366856 - (view) Author: Dong-hee Na (corona10) * (Python committer) Date: 2020-04-20 16:50
Thanks hai shi, now the issue is fixed :)
Date User Action Args
2020-04-20 16:50:16corona10setstatus: open -> closed
resolution: fixed
messages: + msg366856

stage: patch review -> resolved
2020-04-20 16:49:24corona10setmessages: + msg366855
2020-04-20 15:15:24shihai1991setpull_requests: + pull_request18952
2020-04-20 05:23:58shihai1991setmessages: + msg366809
2020-04-20 05:19:45shihai1991setkeywords: + patch
nosy: + shihai1991

pull_requests: + pull_request18947
stage: patch review
2020-03-04 15:08:24corona10create