[prev in list] [next in list] [prev in thread] [next in thread]
List: pykde
Subject: Re: sip-build: Warnings with Wextra and clang
From: Phil Thompson <phil () riverbankcomputing ! com>
Date: 2022-09-07 16:54:43
Message-ID: 7badf4b4f220dd37aa44f08f08a203b3 () riverbankcomputing ! com
[Download RAW message or body]
On 10/08/2022 18:41, Martyn Gigg - STFC UKRI wrote:
> Hi,
>
> I'm using sip to generate some Python bindings to PyQt. Our build
> environment adds -Wextra to the compiler flags and this seems to
> generate warnings about missing field initializers when compiled with
> clang.
>
> I have managed to reproduce this using the basic example at
> https://www.riverbankcomputing.com/static/Docs/sip/examples.html#a-standalone-project,
> adding
>
> [tool.sip.bindings.fib]
> extra-compile-args = ["-Wextra"]
>
> to the pyproject.toml. Building this with `sip-build` on macOS with
> clang-13 produces the following warnings:
>
> These bindings will be built: fib.
> Generating the fib bindings...
> Compiling the 'fib' module...
> sip_core.c:182:9: warning: missing field 'am_send' initializer
> [-Wmissing-field-initializers]
> },
> ^
> sip_core.c:258:1: warning: missing field 'wt_reserved' initializer
> [-Wmissing-field-initializers]
> };
> ^
> sip_core.c:9629:9: warning: missing field 'am_send' initializer
> [-Wmissing-field-initializers]
> },
> ^
> sip_core.c:9705:1: warning: missing field 'wt_reserved' initializer
> [-Wmissing-field-initializers]
> };
> ^
> 4 warnings generated.
> sipfibcmodule.c:19:39: warning: unused parameter 'sipSelf'
> [-Wunused-parameter]
> static PyObject *func_fib_n(PyObject *sipSelf,PyObject *sipArgs)
> ^
> /Users/dmn58364/Code/git/martyngigg/sip-missing-field-error/build/fib/sipfibcmodule.c:84:1:
> warning: missing field 'em_exception_handler' initializer
> [-Wmissing-field-initializers]
> };
> ^
> 2 warnings generated.
> The project has been built.
>
> I can disable the warnings in my code but could there be an underlying
> issue here?
The warnings are all benign but fixed anyway.
Thanks,
Phil
["image001[99].png" (image/png)]
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic