[New-bugs-announce] [issue7576] Avoid warnings in PyModuleDef_HEAD_INIT

Ronald Oussoren report at bugs.python.org
Fri Dec 25 13:40:19 CET 2009

New submission from Ronald Oussoren <ronaldoussoren at mac.com>:

When running GCC with warnings the compiler can warn about incomplete 
structure initializers. This gives spurious warnings when initializing a 
PyModuleDef structure using PyModuleDef_HEAD_INIT

The attached patchs changes PyModuleDef_HEAD_INIT to explicitly 
initialize all fields in PyModuleDef_Base.

An example warning that is silenced by this patch:

Modules/objc/test/structpointer2.m:19: warning: missing initializer
Modules/objc/test/structpointer2.m:19: warning: (near initialization for 

files: moduleobject-init-warnings.patch
keywords: needs review, patch, patch
messages: 96881
nosy: ronaldoussoren
priority: normal
severity: normal
stage: patch review
status: open
title: Avoid warnings in PyModuleDef_HEAD_INIT
type: compile error
versions: Python 3.2
Added file: http://bugs.python.org/file15672/moduleobject-init-warnings.patch

Python tracker <report at bugs.python.org>

More information about the New-bugs-announce mailing list