Hello,

| $ make
| ...
| c++ -DHAVE_CONFIG_H -I. -I. -I../../include -I/usr/include/SDL -D_REENTRANT 
|-I../subtitles -D_REENTRANT -I../../include -Wall -Wno-unused -g -march=i586 
|-ffast-math -pipe -c aviplay.cpp -MT aviplay.lo -MD -MP -MF .deps/aviplay.TPlo  -fPIC 
|-DPIC -o aviplay.lo
| aviplay.cpp:942: default argument given for parameter 2 of `void 
|    avm::AviPlayer::SetAudioFunc(int (*)(void*, unsigned int, void*), void* = 0)
|    '
| aviplay_impl.h:56: after previous specification in `virtual void 
|    avm::AviPlayer::SetAudioFunc(int (*)(void*, unsigned int, void*), void* = 0)
|    '
| ...
| make[2]: *** [aviplay.lo] Error 1
| make[2]: Leaving directory `/var/tmp/avifile0.7-20020419/lib/aviplay'
| make[1]: *** [all-recursive] Error 1
| make[1]: Leaving directory `/var/tmp/avifile0.7-20020419/lib'
| make: *** [all-recursive] Error 1


Duplicate default arguments are forbidden by the C++ standard; CD2
states in 8.3.6[dcl.fct.default]

| 4   ... A default argument shall not be redefined by a later declaration
|     (not even to the same value).


Simple solution is removal of these args; the attached patch is doing
this at the place mentioned above and several other ones.



Enrico

--- avifile0.7-20020419/samples/mjpeg_plugin/mjpeg_encoder.cpp.defarg	Mon Feb  4 10:58:38 2002
+++ avifile0.7-20020419/samples/mjpeg_plugin/mjpeg_encoder.cpp	Sat Apr 20 01:45:53 2002
@@ -20,7 +20,7 @@
     Stop();
 }
 
-int MJPEG_VideoEncoder::EncodeFrame(const CImage* src, void* dest, int* is_keyframe, uint_t* size, int* lpckid=0)
+int MJPEG_VideoEncoder::EncodeFrame(const CImage* src, void* dest, int* is_keyframe, uint_t* size, int* lpckid)
 {
     if ((dest == 0) || (src == 0))
     {
--- avifile0.7-20020419/samples/qtrecompress/rgn.cpp.defarg	Wed Oct  3 22:50:25 2001
+++ avifile0.7-20020419/samples/qtrecompress/rgn.cpp	Sat Apr 20 01:29:21 2002
@@ -7,7 +7,7 @@
 using namespace std;
 template<class T> T mymin(const T x, const T y) {return (x<y)?x:y;}
 
-void CEdgeRgn::Maximize(unsigned char* data, int xd, int yd, int depth=3)
+void CEdgeRgn::Maximize(unsigned char* data, int xd, int yd, int depth)
 {
 
 #ifdef i386
--- avifile0.7-20020419/samples/qtvidcap/qtrenderer.cpp.defarg	Mon Dec 17 14:00:13 2001
+++ avifile0.7-20020419/samples/qtvidcap/qtrenderer.cpp	Sat Apr 20 01:43:09 2002
@@ -35,7 +35,7 @@
     XDestroyImage( x );
 }
 
-ShmRenderer::ShmRenderer(QWidget* w, int x, int y, int xpos=0, int ypos=0) : xshminit(0), xshmimg(0), xshmpm(0)
+ShmRenderer::ShmRenderer(QWidget* w, int x, int y, int xpos, int ypos) : xshminit(0), xshmimg(0), xshmpm(0)
 {
     pthread_mutex_init(&mutex, 0);
     dev=(QPaintDevice*)w;
--- avifile0.7-20020419/samples/qtvidcap/v4lwindow.cpp.defarg	Tue Apr  2 11:28:15 2002
+++ avifile0.7-20020419/samples/qtvidcap/v4lwindow.cpp	Sat Apr 20 01:44:49 2002
@@ -47,7 +47,7 @@
     qApp->postEvent(this, e);
 }
 
-V4LWindow::V4LWindow(v4lxif * pDev, QWidget * pParent=0)
+V4LWindow::V4LWindow(v4lxif * pDev, QWidget * pParent)
 : QWidget(pParent, 0, 0), m_eMode(Overlay), m_pDev(pDev), m_pRenderer(0),
     m_pPopup(0), m_pPicConfig(0), m_pCapDialog(0), m_pCC(0),
     m_bForce4x3(true), m_bSubtitles(false),
@@ -421,7 +421,7 @@
 	    postResizeEvent(width(), height());
 }
 
-void V4LWindow::getOverlaySizeAndOffset(int *pw, int *ph, int* pdx=0, int* pdy=0)
+void V4LWindow::getOverlaySizeAndOffset(int *pw, int *ph, int* pdx, int* pdy)
 {
     int dxpos, dypos;
     int max_w, max_h;
@@ -475,7 +475,7 @@
     return r;
 }
 
-void V4LWindow::setupPicDimensions(int* pdx=0, int* pdy=0)
+void V4LWindow::setupPicDimensions(int* pdx, int* pdy)
 {
     Locker lock(m_Mutex);
     int dxpos, dypos, pw, ph;
--- avifile0.7-20020419/lib/aviplay/aviplay.cpp.defarg	Sat Apr 20 00:50:45 2002
+++ avifile0.7-20020419/lib/aviplay/aviplay.cpp	Sat Apr 20 00:50:48 2002
@@ -938,7 +938,7 @@
     Set(ASYNC_TIME_MS, int(async * 1000), 0);
 }
 
-void AviPlayer::SetAudioFunc(AUDIOFUNC func, void* arg=0)
+void AviPlayer::SetAudioFunc(AUDIOFUNC func, void* arg)
 {
     lockThreads("SetAudioFunc");
     m_pAudiofunc = func;
@@ -968,7 +968,7 @@
     ReseekExact(GetPos());
 }
 
-IAviPlayer* CreateAviPlayer(const char* filename, int bitdepth, const char* subname, const char* vcodec=0, const char* acodec=0) throw(FatalError)
+IAviPlayer* CreateAviPlayer(const char* filename, int bitdepth, const char* subname, const char* vcodec, const char* acodec) throw(FatalError)
 {
     return new AviPlayer(filename, bitdepth, subname, vcodec, acodec);
 }
--- avifile0.7-20020419/lib/aviplay/SdlAudioRenderer.cpp.defarg	Sat Apr 20 00:51:56 2002
+++ avifile0.7-20020419/lib/aviplay/SdlAudioRenderer.cpp	Sat Apr 20 00:52:09 2002
@@ -28,7 +28,7 @@
 AVM_BEGIN_NAMESPACE;
 
 SdlAudioRenderer::SdlAudioRenderer(IReadStream* as, WAVEFORMATEX& Owf,
-				   uint_t useFreq = 0, const char* privcname = 0)
+				   uint_t useFreq, const char* privcname)
     :IAudioRenderer(as, Owf, privcname), m_uiUseFreq(useFreq)
 {
     try
--- avifile0.7-20020419/lib/aviwrite/AviWrite.cpp.defarg	Sat Apr 20 01:04:57 2002
+++ avifile0.7-20020419/lib/aviwrite/AviWrite.cpp	Sat Apr 20 01:05:13 2002
@@ -282,7 +282,7 @@
 }
 
 avm::IVideoWriteStream* AviWriteFile::AddVideoStream(const VideoEncoderInfo* vi,
-						     int frame_rate, int flags = 0)
+						     int frame_rate, int flags)
 {
     const CodecInfo* pci = CodecInfo::match(CodecInfo::Video, vi->cname);
     if (!pci)
--- avifile0.7-20020419/lib/aviwrite/AviVideoWriteStream.cpp.defarg	Sat Apr 20 01:05:42 2002
+++ avifile0.7-20020419/lib/aviwrite/AviVideoWriteStream.cpp	Sat Apr 20 01:05:55 2002
@@ -29,7 +29,7 @@
     delete[] m_local_buffer;
 }
 
-int AviVideoWriteStream::AddFrame(CImage* chunk, uint_t* pSize = 0, int* pKeyframe = 0)
+int AviVideoWriteStream::AddFrame(CImage* chunk, uint_t* pSize, int* pKeyframe)
 {
     if (m_vstatus != 1)
     {
--- avifile0.7-20020419/lib/aviwrite/AviAudioWriteStream.cpp.defarg	Sat Apr 20 00:53:44 2002
+++ avifile0.7-20020419/lib/aviwrite/AviAudioWriteStream.cpp	Sat Apr 20 00:53:54 2002
@@ -8,7 +8,7 @@
 
 AviAudioWriteStream::AviAudioWriteStream(AviWriteFile* file, int ckid, const CodecInfo& ci,
 					 const WAVEFORMATEX* fmt,
-					 int bitrate, int flags=0)
+					 int bitrate, int flags)
     :AviWriteStream(file, ckid, IStream::Audio, ci.fourcc, bitrate, flags),
     m_pIEnc(0), m_astatus(0), m_bitrate(bitrate)
 {
--- avifile0.7-20020419/plugins/libffmpeg/FFVideoDecoder.cpp.defarg	Tue Apr  9 21:15:23 2002
+++ avifile0.7-20020419/plugins/libffmpeg/FFVideoDecoder.cpp	Sat Apr 20 01:18:29 2002
@@ -82,7 +82,7 @@
     return 0;
 }
 
-int FFVideoDecoder::SetDestFmt(int bits = 24, fourcc_t csp = 0)
+int FFVideoDecoder::SetDestFmt(int bits, fourcc_t csp)
 {
     if (!CImage::Supported(csp, bits) || csp != fccYV12)
 	return -1;

Reply via email to