Compiler warnings: SWIG messages #792

Closed
ChrisOelmueller opened this Issue Apr 28, 2013 · 2 comments

Projects

None yet

2 participants

@ChrisOelmueller
Member
engine/core/model/metamodel/modelcoords.i:31: Warning 404: Template 'PointType3D< int32_t >' was already wrapped,
engine/core/util/structures/utilstructures.i:89: Warning 404: previous wrap of 'FIFE::PointType3D< int32_t >'.
engine/core/view/camera.i:32: Warning 404: Template 'PointType3D< int32_t >' was already wrapped,
engine/core/util/structures/utilstructures.i:89: Warning 404: previous wrap of 'FIFE::PointType3D< int32_t >'.
engine/core/loaders/native/map/imaploader.h:70: Warning 473: Returning a pointer or reference in a director method is not recommended.
engine/core/model/metamodel/ipather.i:41: Warning 473: Returning a pointer or reference in a director method is not recommended.
engine/core/model/metamodel/ipather.i:41: Warning 473: Returning a pointer or reference in a director method is not recommended.
engine/core/model/metamodel/ipather.i:41: Warning 473: Returning a pointer or reference in a director method is not recommended.
@prock-fife
Member

I've looked at the "previous wrap of" before. It's a warning from swig because we use multiple names for essentially a single type/template in fife. I'm sure swig is generating the same code multiple times because of it. The question is how do we handle this situation properly in swig?

@prock-fife
Member

I've looked at the "already wrapped" warnings (again) as described in this issue. I see no actual way around it. If we use typedefs swig will not provide access to those types from Python. There is no way I can see around these warning messages. I was hoping for find a resolution that would shrink the generated swig files which in turn would improve compile time.

I also tried dynamically copying the Point3D type at runtime using "fife.ModelCoordinate = fife.Point3D" however this caused all sorts of issues (type errors when returning a FIFE::ModelCoordinate and other strange behavior noticeable in the MultiPathfinderTest in fife_test.

@prock-fife prock-fife added a commit that closed this issue Jun 19, 2013
@prock-fife prock-fife Ignore swig warnings
From now on we ignore a few swig warnings that we cannot (or will not) do
anything about.  This includes the warning 404 (already wrapped) and
warning 473 (returning a pointer or reference in a director).

fixes #792
e13c141
@koobs koobs added a commit to freebsd/freebsd-ports that referenced this issue Jan 14, 2014
@koobs koobs games/py-fife: Update to 0.3.5, fix make package
- Update to 0.3.5
- Update pkg-plist
- Add missing PKGNAMEPREFIX
- Enable STAGE support
- Switch BUILD_DEPENDS from swig13 to swig20
- Add LICENSE (LGPL21)
- Replace USE_SCONS / SCONS_* with USES=scons
- Re-order USE_* section
- Patch and backport Sconscript changes to:
    a) Silence addition warnings [1]
    b) Set SWIG includes and outdir that are not being honoured by
       scons at the moment

This commit combined with that from ports/185684 fixes building on 10.0+.

[1] fifengine/fifengine#792

PR:		ports/182433
Approved by:	Green Dog <fiziologus@gmail.com> (maintainer, via email)
MFH:		2014Q1
85a95e2
@knu knu pushed a commit to idaemons/freebsd-ports that referenced this issue Jan 19, 2014
koobs games/py-fife: Update to 0.3.5, fix make package
- Update to 0.3.5
- Update pkg-plist
- Add missing PKGNAMEPREFIX
- Enable STAGE support
- Switch BUILD_DEPENDS from swig13 to swig20
- Add LICENSE (LGPL21)
- Replace USE_SCONS / SCONS_* with USES=scons
- Re-order USE_* section
- Patch and backport Sconscript changes to:
    a) Silence addition warnings [1]
    b) Set SWIG includes and outdir that are not being honoured by
       scons at the moment

This commit combined with that from ports/185684 fixes building on 10.0+.

[1] fifengine/fifengine#792

PR:		ports/182433
Approved by:	Green Dog <fiziologus@gmail.com> (maintainer, via email)
MFH:		2014Q1


git-svn-id: svn+ssh://svn.freebsd.org/ports/head@339669 35697150-7ecd-e111-bb59-0022644237b5
f956d81
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment