Skip to content

"unreachable code" warning in functions in *_igate.cxx files #2

@consultit

Description

@consultit

Building panda3d I discovered that in the files *_igate.cxx (created by dtool/interrogated) unreachable code is generated for the functions "sequence getter for property ..." (ie Dtool_*_Sequence_Getitem ()), such as:

   if (! _PyErr_OCCURRED()) {
     return Dtool_Raise_BadArgumentsError (
      ...
   }

Indeed g++ (v. 8.3) issues warnings such as:
... warning: control reaches end of non-void function ...
Examples of this code can be found in different files: libp3chan_igate.cxx, libp3collide_igate.cxx etc ...
I report this as it could hide an error.
Bye

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions