classification
Title: _Py_ANNOTATE_MEMORY_ORDER has unused argument, effects code which includes Python.h
Type: compile error Stage:
Components: Interpreter Core Versions: Python 3.2, Python 3.3
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: Tjebbe, barry, ideasman42, jyasskin, python-dev, storvann
Priority: normal Keywords:

Created on 2011-02-08 03:16 by ideasman42, last changed 2011-12-05 21:51 by barry. This issue is now closed.

Messages (4)
msg128165 - (view) Author: Campbell Barton (ideasman42) Date: 2011-02-08 03:16
Hi, Im buildiong blender3d with  -Werror and python 3.2 gives an error which doesnt happen in 3.1.

Tested with SVN r88378. on linux.
---
cc1: warnings being treated as errors
In file included from /opt/py32/include/python3.2d/Python.h:52:0,
                 from /data/src/blender/blender/source/blender/python/intern/bpy_app.h:27,
                 from /data/src/blender/blender/source/blender/python/intern/bpy_app.c:25:
/opt/py32/include/python3.2d/pyatomic.h: In function '_Py_ANNOTATE_MEMORY_ORDER':
/opt/py32/include/python3.2d/pyatomic.h:59:48: error: unused parameter 'address'


There are 2 ways to solve this:
pyatomic.h could include the line:
    (void)address;

Or the macro's which do nothing could be changed from...
#define _Py_ANNOTATE_HAPPENS_BEFORE(blah) /* empty */
to...
#define _Py_ANNOTATE_HAPPENS_BEFORE(blah) (void)blah
msg148887 - (view) Author: Barry A. Warsaw (barry) * (Python committer) Date: 2011-12-05 20:54
Confirmed, and this is really annoying.  I'm of the mind to apply your second idea.
msg148888 - (view) Author: Barry A. Warsaw (barry) * (Python committer) Date: 2011-12-05 20:56
Sorry, I meant your first option.
msg148891 - (view) Author: Roundup Robot (python-dev) Date: 2011-12-05 21:50
New changeset 4579cd952156 by Barry Warsaw in branch '3.2':
- Issue #11147: Fix an unused argument in _Py_ANNOTATE_MEMORY_ORDER.  (Fix
http://hg.python.org/cpython/rev/4579cd952156

New changeset 6b6c79eba944 by Barry Warsaw in branch 'default':
- Issue #11147: Fix an unused argument in _Py_ANNOTATE_MEMORY_ORDER.  (Fix
http://hg.python.org/cpython/rev/6b6c79eba944
History
Date User Action Args
2011-12-05 21:51:26barrysetstatus: open -> closed
resolution: fixed
2011-12-05 21:50:50python-devsetnosy: + python-dev
messages: + msg148891
2011-12-05 20:56:26barrysetmessages: + msg148888
2011-12-05 20:54:17barrysetnosy: + barry
messages: + msg148887
2011-06-15 08:14:19Tjebbesetnosy: + Tjebbe
2011-04-30 14:00:29storvannsetnosy: + storvann
2011-02-08 13:23:33pitrousetnosy: + jyasskin

components: + Interpreter Core
versions: + Python 3.3
2011-02-08 03:16:05ideasman42create