This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Compilation warning on GCC version 7.4.0-1ubuntu1~18.04.1
Type: behavior Stage: resolved
Components: Build Versions: Python 3.9
process
Status: closed Resolution: duplicate
Dependencies: Superseder: Possible uninitialized variable in Objects/obmalloc.c
View: 37732
Assigned To: Nosy List: hansrajdas, vstinner
Priority: normal Keywords:

Created on 2019-08-15 20:30 by hansrajdas, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
warning-2019-08-15 01-15-06.png hansrajdas, 2019-08-15 20:30 Objects/obmalloc.c
Pull Requests
URL Status Linked Edit
PR 15309 hansrajdas, 2019-08-15 20:30
Messages (2)
msg349824 - (view) Author: Hansraj Das (hansrajdas) * Date: 2019-08-15 20:30
I am facing below compilation warning on compilation python source:

***********************************************************************
gcc -pthread -c -Wno-unused-result -Wsign-compare -g -Og -Wall    -std=c99 -Wextra -Wno-unused-result -Wno-unused-parameter -Wno-missing-field-initial
izers -Werror=implicit-function-declaration  -I./Include/internal  -I. -I./Include    -DPy_BUILD_CORE -o Objects/obmalloc.o Objects/obmalloc.c        
Objects/obmalloc.c: In function __PyObject_Malloc_:                                                                                                   
Objects/obmalloc.c:1646:16: warning: _ptr_ may be used uninitialized in this function [-Wmaybe-uninitialized]                                         
         return ptr;                                                                                                                                  
                ^~~
***********************************************************************       

This is another thread having suggestions from Victor: https://github.com/python/cpython/pull/15293
msg349951 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2019-08-19 10:15
Duplicate of bpo-37732.
History
Date User Action Args
2022-04-11 14:59:19adminsetgithub: 82050
2019-08-19 10:15:42vstinnersetmessages: + msg349951
2019-08-19 10:15:34vstinnersetstatus: open -> closed
superseder: Possible uninitialized variable in Objects/obmalloc.c
stage: resolved
2019-08-17 19:28:25hansrajdassetresolution: duplicate
2019-08-15 20:30:41hansrajdascreate