Bug 52595 - wavplayobject_impl.cc:64: warning: passing `float' for argument 1 of `Arts::poTime::poTime(long int, long int, float, const std::string&)'
Summary: wavplayobject_impl.cc:64: warning: passing `float' for argument 1 of `Arts::p...
Status: CLOSED FIXED
Alias: None
Product: arts
Classification: Miscellaneous
Component: general (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR wishlist
Target Milestone: ---
Assignee: Stefan Westerfeld
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-01-04 18:05 UTC by Olaf Hering
Modified: 2003-02-19 15:10 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 Olaf Hering 2003-01-04 18:05:05 UTC
Version:            (using KDE KDE 3.0.99)
Installed from:    Compiled From Sources
Compiler:          gcc 3.2.1 
OS:          Linux

wrong argument types for the function.
I know nothing about c++, so I can not provide a patch.

It seems it is not fixed in the ARTS_1_1_BRANCH

/bin/sh ../libtool --silent --mode=compile --tag=CXX g++ -DHAVE_CONFIG_H -I. -I.
 -I.. -I../mcop -I../flow -I../flow -DEXECUTE=\"/opt/kde-3.1rc6/bin/artsd\" -I/o
pt/kde-3.1rc6/include -I/usr/qt/3/include -I/usr/X11R6/include  -I../libltdl  -D
QT_THREAD_SUPPORT  -D_REENTRANT  -Wnon-virtual-dtor -Wno-long-long -Wundef -Wall
 -pedantic -W -Wpointer-arith -Wmissing-prototypes -Wwrite-strings -ansi -D_XOPE
N_SOURCE=500 -D_BSD_SOURCE -Wcast-align -Wconversion -O2 -O2 -fsigned-char -Wall
 -fmessage-length=0 -g -fno-exceptions -fno-check-new  -ftemplate-depth-99  -c -
o wavplayobject_impl.lo `test -f 'wavplayobject_impl.cc' || echo './'`wavplayobj
ect_impl.cc
wavplayobject_impl.cc: In member function `virtual Arts::poTime WavPlayObject_im
pl::currentTime()':
wavplayobject_impl.cc:64: warning: passing `float' for argument 1 of `Arts::poTi
me::poTime(long int, long int, float, const std::string&)'
wavplayobject_impl.cc:64: warning: passing `float' for argument 2 of `Arts::poTi
me::poTime(long int, long int, float, const std::string&)'
wavplayobject_impl.cc: In member function `virtual Arts::poTime WavPlayObject_im
pl::overallTime()':
wavplayobject_impl.cc:71: warning: passing `float' for argument 1 of `Arts::poTi
me::poTime(long int, long int, float, const std::string&)'
wavplayobject_impl.cc:71: warning: passing `float' for argument 2 of `Arts::poTi
me::poTime(long int, long int, float, const std::string&)'

        poTime currentTime() {
                if(!wav) return poTime(0,0,0,"samples");

                float timesec = flpos / (float)wav->samplingRate;
                float timems = (timesec - floor(timesec)) * 1000.0;

                return poTime(timesec, timems, (int)flpos, "samples");
        }


soundserver/kmedia2.h:
/* this file was generated by the MCOP idl compiler - DO NOT EDIT */
namespace Arts {
enum poState {posIdle = 0, posPlaying = 1, posPaused = 2};
enum poCapabilities {capSeek = 1, capPause = 2};
};
namespace Arts {
class poTime : public Arts::Type {
public: 
        poTime();
        poTime(long _a_seconds, long _a_ms, float _a_custom, const std::string& _a_customUnit);
        poTime(Arts::Buffer& stream);
        poTime(const poTime& copyType);
        poTime& operator=(const poTime& assignType);
        long seconds;
        long ms;
        float custom;
        std::string customUnit;

// marshalling functions
        void readType(Arts::Buffer& stream);
        void writeType(Arts::Buffer& stream) const;
        std::string _typeName() const;
};
Comment 1 Arnold Krille 2003-02-19 15:09:29 UTC
Subject: arts/soundserver

CVS commit by akrille: 

Inserting some explicit casts to remove warnings...

Fixes http://bugs.kde.org/show_bug.cgi?id=52595

CCMAIL: 52595@bugs.kde.org


  M +2 -2      wavplayobject_impl.cc   1.16


--- arts/soundserver/wavplayobject_impl.cc  #1.15:1.16
@@ -62,5 +62,5 @@ public:
                 float timems = (timesec - floor(timesec)) * 1000.0;
 
-                return poTime(timesec, timems, (int)flpos, "samples");
+                return poTime( int( timesec ), int( timems ), (int)flpos, "samples" );
         }
 
@@ -69,5 +69,5 @@ public:
                 float timems = (timesec - floor(timesec)) * 1000.0;
 
-                return poTime(timesec, timems, sampleCount(), "samples");
+                return poTime( int( timesec ), int( timems ), sampleCount(), "samples" );
         }
 


Comment 2 Arnold Krille 2003-02-19 15:10:36 UTC
Will go on with removing warnings in the near future... 
 
Closing this, 
 
Arnold