Bug 274455 - build fails in kmemoryinfo - invalid conversion from 'void*' to 'kstat_named_t*'
Summary: build fails in kmemoryinfo - invalid conversion from 'void*' to 'kstat_named_t*'
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Portability-Compilation (show other bugs)
Version: 2.0.0
Platform: Compiled Sources Solaris
: NOR normal
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-05-29 21:10 UTC by tropikhajma
Modified: 2017-08-19 21:05 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In: 2.0.0


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description tropikhajma 2011-05-29 21:10:11 UTC
Version:           2.0.0 (using KDE 4.6.2) 
OS:                Solaris

/home/test/packages/BUILD/digikam-2.0.0-beta5/i386/digikam-2.0.0-beta5/core/libs/3rdparty/kmemoryinfo/kmemoryinfo_backend.cpp:248:44: error: invalid conversion from 'void*' to 'kstat_named_t*'

this worked for me, however I don't really speak c/c++:
--- /home/test/packages/BUILD/digikam-2.0.0-beta5/i386/digikam-2.0.0-beta5/core/libs/3rdparty/kmemoryinfo/kmemoryinfo_backend.cpp.orig	2011-05-29 21:00:51.239385429 +0200
+++ /home/test/packages/BUILD/digikam-2.0.0-beta5/i386/digikam-2.0.0-beta5/core/libs/3rdparty/kmemoryinfo/kmemoryinfo_backend.cpp	2011-05-29 21:04:44.065370487 +0200
@@ -245,7 +245,8 @@
         //sg_set_error(SG_ERROR_KSTAT_READ, NULL);
         return false;
     }
-    if((kn=kstat_data_lookup(ksp, "freemem")) == NULL){
+    kstat_data_lookup(ksp, "freemem");
+    if(ksp == NULL){
         //sg_set_error(SG_ERROR_KSTAT_DATA_LOOKUP, "freemem");
         return false;
     }

Reproducible: Always
Comment 1 tropikhajma 2011-05-31 00:50:26 UTC
actually, this is better:

--- core/libs/3rdparty/kmemoryinfo/kmemoryinfo_backend.cpp.orig  2011-05-29 21:00:51.239385429 +0200
+++ core/libs/3rdparty/kmemoryinfo/kmemoryinfo_backend.cpp       2011-05-29 21:04:44.065370487 +0200
@@ -245,7 +245,8 @@
         //sg_set_error(SG_ERROR_KSTAT_READ, NULL);
         return false;
     }
-    if((kn=kstat_data_lookup(ksp, "freemem")) == NULL){
+    if((kn=(kstat_named_t *)kstat_data_lookup(ksp, "freemem")) == NULL){
+    
         //sg_set_error(SG_ERROR_KSTAT_DATA_LOOKUP, "freemem");
         return false;
     }
Comment 2 caulier.gilles 2011-06-05 21:33:22 UTC
Git commit a376a9a1fe803a732bd286fdbedc38707c10fbca by Gilles Caulier.
Committed on 05/06/2011 at 21:30.
Pushed by cgilles into branch 'master'.

build under Solaris
BUGS: 274455

M  +19   -19   libs/3rdparty/kmemoryinfo/kmemoryinfo_backend.cpp     

http://commits.kde.org/digikam/a376a9a1fe803a732bd286fdbedc38707c10fbca