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: compiler warnings for various modules on Linux buildslaves
Type: compile error Stage: resolved
Components: Build Versions: Python 3.2
process
Status: closed Resolution: duplicate
Dependencies: Superseder: Aliasing warnings in socketmodule.c
View: 8623
Assigned To: Nosy List: BreamoreBoy, djc, jfinkels, martin.panter, theller
Priority: normal Keywords:

Created on 2010-10-06 05:51 by jfinkels, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Messages (5)
msg118051 - (view) Author: Jeffrey Finkelstein (jfinkels) * Date: 2010-10-06 05:51
On Ubuntu 10.04.1, with
"uname -a" outputting "Linux hostname 2.6.32-25-generic #44-Ubuntu SMP Fri Sep 17 20:26:08 UTC 2010 i686 GNU/Linux"
"gcc --version" outputting "gcc (Ubuntu 4.4.3-4ubuntu5) 4.4.3"

On hg revision 7965 of the py3k branch, I get the following compile-time warnings:

/mnt/data/src/py3k/Modules/_posixsubprocess.c: In function ‘child_exec’:
/mnt/data/src/py3k/Modules/_posixsubprocess.c:152: warning: ignoring return value of ‘write’, declared with attribute warn_unused_result
/mnt/data/src/py3k/Modules/_posixsubprocess.c:158: warning: ignoring return value of ‘write’, declared with attribute warn_unused_result
/mnt/data/src/py3k/Modules/_posixsubprocess.c:159: warning: ignoring return value of ‘write’, declared with attribute warn_unused_result
/mnt/data/src/py3k/Modules/_posixsubprocess.c:163: warning: ignoring return value of ‘write’, declared with attribute warn_unused_result
/mnt/data/src/py3k/Modules/_posixsubprocess.c:164: warning: ignoring return value of ‘write’, declared with attribute warn_unused_result

/mnt/data/src/py3k/Modules/socketmodule.c: In function ‘socket_gethostbyname_ex’:
/mnt/data/src/py3k/Modules/socketmodule.c:3282: warning: dereferencing pointer ‘sa’ does break strict-aliasing rules
/mnt/data/src/py3k/Modules/socketmodule.c:3280: note: initialized from here
/mnt/data/src/py3k/Modules/socketmodule.c: In function ‘socket_gethostbyaddr’:
/mnt/data/src/py3k/Modules/socketmodule.c:3339: warning: dereferencing pointer ‘sa’ does break strict-aliasing rules
/mnt/data/src/py3k/Modules/socketmodule.c:3309: note: initialized from here

/mnt/data/src/py3k/Modules/_multiprocessing/multiprocessing.c: In function ‘multiprocessing_sendfd’:
/mnt/data/src/py3k/Modules/_multiprocessing/multiprocessing.c:125: warning: dereferencing type-punned pointer will break strict-aliasing rules
/mnt/data/src/py3k/Modules/_multiprocessing/multiprocessing.c: In function ‘multiprocessing_recvfd’:
/mnt/data/src/py3k/Modules/_multiprocessing/multiprocessing.c:168: warning: dereferencing type-punned pointer will break strict-aliasing rules

/mnt/data/src/py3k/Modules/_ctypes/libffi/src/closures.c: In function ‘dlmmap_locked’:
/mnt/data/src/py3k/Modules/_ctypes/libffi/src/closures.c:416: warning: ignoring return value of ‘ftruncate’, declared with attribute warn_unused_result
/mnt/data/src/py3k/Modules/_ctypes/libffi/src/closures.c:428: warning: ignoring return value of ‘ftruncate’, declared with attribute warn_unused_result
/mnt/data/src/py3k/Modules/_ctypes/libffi/src/dlmalloc.c: In function ‘mmap_resize’:
/mnt/data/src/py3k/Modules/_ctypes/libffi/src/dlmalloc.c:3193: warning: implicit declaration of function ‘mremap’
/mnt/data/src/py3k/Modules/_ctypes/libffi/src/dlmalloc.c: In function ‘sys_trim’:
/mnt/data/src/py3k/Modules/_ctypes/libffi/src/dlmalloc.c:3612: warning: comparison between pointer and integer
msg119141 - (view) Author: Dirkjan Ochtman (djc) * (Python committer) Date: 2010-10-19 16:10
At least one of these also happens on Gentoo:


Modules/_ctypes/libffi/src/dlmalloc.c:3193: warning: implicit declaration of function 'mremap'
Modules/_ctypes/libffi/src/dlmalloc.c:3193: warning: cast to pointer from integer of different size
Modules/_ctypes/libffi/src/dlmalloc.c:3612: warning: comparison between pointer and integer
msg119142 - (view) Author: Dirkjan Ochtman (djc) * (Python committer) Date: 2010-10-19 16:25
Current Ubuntu builds from the buildbot also only show the libffi warning:

http://www.python.org/dev/buildbot/builders/x86%20Ubuntu%20Shared%203.x/builds/2326/steps/compile/logs/warnings

I suspect we don't really fix libffi compile warnings because (a) libffi is just bundled from upstream in python, for ctypes, AFAICT, and (b) libffi maintenance seems to be intermittent at best. For example, it seems like we're not bundling any released version of libffi, but just some snapshot from the upstream repo.
msg227783 - (view) Author: Mark Lawrence (BreamoreBoy) * Date: 2014-09-28 23:42
From msg119142 "I suspect we don't really fix libffi compile warnings because ..." so it looks as if we wouldn't bother anyway, plus these compiler warnings are years old so can this be closed as "out of date"?
msg271161 - (view) Author: Martin Panter (martin.panter) * (Python committer) Date: 2016-07-24 14:56
The three unused results in Modules/_posixsubprocess.c are probably fixed by revision dd18cccb55b0.

The Modules/socketmodule.c pointer aliasing was addressed in 3.3 by Issue 8623, and the Modules/_multiprocessing/multiprocessing.c type-punning has been eliminated in 3.3 by Issue 12981.

Also, I tend to agree about the libffi stuff. So I am closing this.
History
Date User Action Args
2022-04-11 14:57:07adminsetgithub: 54245
2016-07-24 14:56:32martin.pantersetstatus: open -> closed

superseder: Aliasing warnings in socketmodule.c

nosy: + martin.panter
messages: + msg271161
resolution: duplicate
stage: resolved
2014-09-28 23:42:24BreamoreBoysetnosy: + BreamoreBoy
messages: + msg227783
2010-10-19 16:25:20djcsetnosy: + theller
messages: + msg119142
2010-10-19 16:10:02djcsetnosy: + djc

messages: + msg119141
title: compiler warnings for various modules on Ubuntu x86 -> compiler warnings for various modules on Linux buildslaves
2010-10-06 05:51:23jfinkelscreate