Bug 325055 - kross generates warning with old-style-cast
Summary: kross generates warning with old-style-cast
Status: RESOLVED FIXED
Alias: None
Product: kdelibs
Classification: Frameworks and Libraries
Component: kdecore (show other bugs)
Version: 4.11.1
Platform: Ubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: kdelibs bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-09-18 13:13 UTC by Stephane MANKOWSKI
Modified: 2016-06-17 00:27 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Stephane MANKOWSKI 2013-09-18 13:13:21 UTC
Some compilation warnings are generated due to kross if old-style-cast is used.

Reproducible: Always

Steps to Reproduce:
Build kross or an application using kross (#include <Kross/Manager>) with old-style-cast activated in CMakeLists.txt ( SET(CMAKE_CXX_FLAGS "-Wold-style-cast ${CMAKE_CXX_FLAGS}") ).

Actual Results:  
Some warnings are generated like this:
/usr/include/KDE/../kross/core/metatype.h: In member function ‘virtual void* Kross::MetaTypeImpl<METATYPE>::toVoidStar()’:
/usr/include/KDE/../kross/core/metatype.h:73:58: attention : utilisation d'un vieux style de transtypage (cast) [-Wold-style-cast]
/usr/include/KDE/../kross/core/metatype.h: In member function ‘virtual void* Kross::MetaTypeVariant<VARIANTTYPE>::toVoidStar()’:
/usr/include/KDE/../kross/core/metatype.h:99:58: attention : utilisation d'un vieux style de transtypage (cast) [-Wold-style-cast]
/usr/include/KDE/../kross/core/metatype.h: In member function ‘virtual void* Kross::MetaTypeVoidStar::toVoidStar()’:
/usr/include/KDE/../kross/core/metatype.h:124:58: attention : utilisation d'un vieux style de transtypage (cast) [-Wold-style-cast]

Expected Results:  
No warning
Comment 1 Alexander Potashev 2016-06-16 21:31:21 UTC
Git commit d746370814a40a6d5bd56ae5dc13909aec9d62f4 by Alexander Potashev.
Committed on 16/06/2016 at 18:02.
Pushed by aspotashev into branch 'KDE/4.14'.

Do not use C-style casts into void*

See also the respective commit in kross.git.

M  +3    -3    kross/core/metatype.h

http://commits.kde.org/kdelibs/d746370814a40a6d5bd56ae5dc13909aec9d62f4
Comment 2 Alexander Potashev 2016-06-17 00:27:33 UTC
Git commit fca6a1b796621ccd940244e9380a50798d20eef9 by Alexander Potashev.
Committed on 17/06/2016 at 00:29.
Pushed by aspotashev into branch 'master'.

Do not use C-style casts into void*
REVIEW: 128215

M  +3    -3    src/core/metatype.h

http://commits.kde.org/kross/fca6a1b796621ccd940244e9380a50798d20eef9