Issue 10036: compiler warnings for various modules on Linux buildslaves (original) (raw)
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)
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
Author: Dirkjan Ochtman (djc) *
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
Author: Dirkjan Ochtman (djc) *
Date: 2010-10-19 16:25
Current Ubuntu builds from the buildbot also only show the libffi warning:
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.
Author: Mark Lawrence (BreamoreBoy) *
Date: 2014-09-28 23:42
From "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"?
Author: Martin Panter (martin.panter) *
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:07
admin
set
github: 54245
2016-07-24 14:56:32
martin.panter
set
status: open -> closed
superseder: Aliasing warnings in socketmodule.c
nosy: + martin.panter
messages: +
resolution: duplicate
stage: resolved
2014-09-28 23:42:24
BreamoreBoy
set
nosy: + BreamoreBoy
messages: +
2010-10-19 16:25:20
djc
set
nosy: + theller
messages: +
2010-10-19 16:10:02
djc
set
nosy: + djc
messages: +
title: compiler warnings for various modules on Ubuntu x86 -> compiler warnings for various modules on Linux buildslaves
2010-10-06 05:51:23
jfinkels
create