Commit f825205a authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont
Browse files

- Fix sleep implementation

- Fix most warnings
parent 71c6abd4
......@@ -2,7 +2,7 @@
* file.cpp: File management
*-------------------------------------------------------------------------------
* (c)1999-2001 VideoLAN
* $Id: file.cpp,v 1.8 2003/12/12 11:32:39 adq Exp $
* $Id$
*
* Authors: Benoit Steiner <benny@via.ecp.fr>
* Arnaud de Bossoreille de Ribou <bozo@via.ecp.fr>
......@@ -100,7 +100,7 @@ C_File::C_File(const C_String& strPath) : m_strPath(strPath)
// See the fread manual for an explanation of the strMode parameter.
// Throws a FileException if the file could not be opened.
//------------------------------------------------------------------------------
void C_File::Open(const C_String& strMode, int iPermissions)
void C_File::Open(const C_String& strMode, int)
{
m_hFd = fopen(m_strPath.GetString(), strMode.GetString());
......
......@@ -119,7 +119,7 @@ C_CfgFileParser::C_CfgFileParser(C_ParserHandler* pCallBack) :
//
//------------------------------------------------------------------------------
C_Vector<C_String> C_CfgFileParser::Parse(const C_String& strFileName,
bool bCompletePath,
bool,
const C_String& strRoot)
{
C_Vector<C_String> vInclude;
......
......@@ -2,7 +2,7 @@
* reflect.cpp: Reflective information support
*-------------------------------------------------------------------------------
* (c)1999-2001 VideoLAN
* $Id: reflect.cpp,v 1.2 2003/10/27 10:58:10 sam Exp $
* $Id$
*
* Authors: Benoit Steiner <benny@via.ecp.fr>
*
......@@ -78,7 +78,7 @@ C_ClassField::C_ClassField()
//------------------------------------------------------------------------------
//
//------------------------------------------------------------------------------
C_ClassMethod::C_ClassMethod(byte bReturnType, byte aArgTypes[])
C_ClassMethod::C_ClassMethod(byte, byte[])
{
// To write
}
......
......@@ -2,7 +2,7 @@
* serialization.cpp: Serialization support
*-------------------------------------------------------------------------------
* (c)1999-2001 VideoLAN
* $Id: serialization.cpp,v 1.2 2003/10/27 10:58:10 sam Exp $
* $Id$
*
* Authors: Benoit Steiner <benny@via.ecp.fr>
*
......@@ -115,7 +115,7 @@ const byte* C_Serializer::GetNextBytes()
//------------------------------------------------------------------------------
//
//------------------------------------------------------------------------------
void C_Serializer::SetNextBytes(const byte* pBytes)
void C_Serializer::SetNextBytes(const byte*)
{
m_iCurrentField++;
......
......@@ -2,7 +2,7 @@
* settings.cpp: Application settings management
*-------------------------------------------------------------------------------
* (c)1999-2001 VideoLAN
* $Id: settings.cpp,v 1.18 2003/10/27 10:58:10 sam Exp $
* $Id$
*
* Authors: Benoit Steiner <benny@via.ecp.fr>
*
......@@ -218,7 +218,7 @@ C_Settings::C_Settings() : m_cSettings(2311)
//------------------------------------------------------------------------------
//
//------------------------------------------------------------------------------
void C_Settings::Load(const C_String& strDefaultCfgFile, bool bReadCmdLine)
void C_Settings::Load(const C_String& strDefaultCfgFile, bool)
{
C_Vector<C_String> vInclude;
C_SettingsHandler cHandler(this);
......
......@@ -2,7 +2,7 @@
* socket.cpp: socket management
*-------------------------------------------------------------------------------
* (c)1999-2001 VideoLAN
* $Id: socket.cpp,v 1.24 2004/02/16 17:07:48 sam Exp $
* $Id$
*
* Authors: Benoit Steiner <benny@via.ecp.fr>
* Arnaud de Bossoreille de Ribou <bozo@via.ecp.fr>
......@@ -858,8 +858,8 @@ int C_Socket::WriteTo(C_UnixAddr& cPeerAddr,
//------------------------------------------------------------------------------
//
//------------------------------------------------------------------------------
int C_Socket::SendTo(C_Inet4Addr& cPeerAddr,
const C_SocketBuff& cBuffers, unsigned int iSlotCount)
int C_Socket::SendTo(C_Inet4Addr&,
const C_SocketBuff&, unsigned int)
{
// Further writing
ASSERT(false);
......
......@@ -2,7 +2,7 @@
* socket.h: Socket class definition
*-------------------------------------------------------------------------------
* (c)1999-2001 VideoLAN
* $Id: socket.h,v 1.13 2004/02/16 17:07:48 sam Exp $
* $Id$
*
* Authors: Benoit Steiner <benny@via.ecp.fr>
* Arnaud de Bossoreille de Ribou <bozo@via.ecp.fr>
......@@ -158,7 +158,7 @@ class C_UnixAddr
{
public:
void Build(const C_String& strPath);
void Build(C_String& strPath, C_String& strPort, int foo)
void Build(C_String& strPath, C_String&, int)
{ Build(strPath); }; // ignore port
const struct sockaddr_un* GetUnixAddr() const
{
......
......@@ -153,7 +153,7 @@ C_String::C_String(const C_String& strSrc)
// Memory is allocated but not initialised: this is why this constructor is
// protected and reserved to internal use
//------------------------------------------------------------------------------
C_String::C_String(unsigned int iSize, bool bDummy)
C_String::C_String(unsigned int iSize, bool)
{
m_iLength = iSize;
m_pszBuff = new char[iSize+1];
......
......@@ -2,7 +2,7 @@
* system.cpp: System base functions
*-------------------------------------------------------------------------------
* (c)1999-2001 VideoLAN
* $Id: system.cpp,v 1.5 2003/10/27 10:58:10 sam Exp $
* $Id$
*
* Authors: Benoit Steiner <benny@via.ecp.fr>
*
......@@ -34,6 +34,7 @@
#include <errno.h>
#include <string.h>
#endif
#include <time.h>
#ifdef HAVE_SLEEP
#include <unistd.h>
#endif
......@@ -59,6 +60,7 @@
//------------------------------------------------------------------------------
int GetErrorCode(int iSubSystem/* = SYSTEM_DEFAULT*/)
{
(void)iSubSystem;
#ifdef _WIN32
switch(iSubSystem)
{
......@@ -125,7 +127,11 @@ C_String GetErrorMsg(int iSubSystem/* = SYSTEM_DEFAULT*/)
//------------------------------------------------------------------------------
void Pause(unsigned int iSeconds)
{
#ifdef HAVE_SLEEP
#if defined HAVE_NANOSLEEP
struct timespec ts = { iSeconds, 0 };
nanosleep(&ts, NULL);
#elif defined HAVE_SLEEP
sleep(iSeconds);
#elif defined WIN32
......
......@@ -361,7 +361,7 @@ template <class T> void C_Vector<T>::QuickSort(int iLeft, int iRight)
template <class T> void C_Vector<T>::Swap(unsigned int i, unsigned int j)
{
if ((i >= 0) && (i < Size()) && (j >= 0) && (j < Size()))
if ((i < Size()) && (j < Size()))
{
T* Ttmp = m_apElems[i];
m_apElems[i] = m_apElems[j];
......
......@@ -2,7 +2,7 @@
* filereader.h: file reader
*-------------------------------------------------------------------------------
* (c)1999-2001 VideoLAN
* $Id: filereader.h,v 1.9 2003/08/20 21:26:56 adq Exp $
* $Id$
*
* Authors: Arnaud de Bossoreille de Ribou <bozo@via.ecp.fr>
*
......@@ -43,7 +43,7 @@ public:
virtual void Close();
virtual s64 Read(byte* pBuff, s64 iSize);
virtual int GetFrame(byte ** pBuff ,int iSize) { return 0;};
virtual int GetFrame(byte **,int) { return 0;};
virtual int GetAudioFD() { return 0;};
virtual s64 Seek(s64 iOffset, s64 bStartPos);
......
......@@ -2,7 +2,7 @@
* ps2ts.cpp: threaded PS to TS converter
*-------------------------------------------------------------------------------
* (c)1999-2001 VideoLAN
* $Id: ps2ts.cpp,v 1.17 2003/10/27 10:58:11 sam Exp $
* $Id$
*
* Authors: Arnaud de Bossoreille de Ribou <bozo@via.ecp.fr>
*
......@@ -155,8 +155,7 @@ void C_Ps2TsMpegConverter::InitWork()
//------------------------------------------------------------------------------
// Get Next Ts Packet from the Reader
//------------------------------------------------------------------------------
s64 C_Ps2TsMpegConverter::GetNextTsPackets(C_Fifo<C_TsPacket>* pPackets,
int skip)
s64 C_Ps2TsMpegConverter::GetNextTsPackets(C_Fifo<C_TsPacket>* pPackets, int)
{
s64 iRc = 0;
bool bDiscontinuity = false;
......@@ -213,8 +212,7 @@ s64 C_Ps2TsMpegConverter::GetNextTsPackets(C_Fifo<C_TsPacket>* pPackets,
//------------------------------------------------------------------------------
// Get Previous Ts Packet from the Reader
//------------------------------------------------------------------------------
s64 C_Ps2TsMpegConverter::GetPrevTsPackets(C_Fifo<C_TsPacket>* pPacket,
int skip)
s64 C_Ps2TsMpegConverter::GetPrevTsPackets(C_Fifo<C_TsPacket>*, int)
{
return MPEG_BEGINOFSTREAM;
}
......
......@@ -2,7 +2,7 @@
* pvrreader.cpp: Reading from an Hauppauge PVR board
*-------------------------------------------------------------------------------
* (c)1999-2003 VideoLAN
* $Id: pvrreader.cpp,v 1.5 2003/10/27 10:58:11 sam Exp $
* $Id$
*
* Authors: Tristan Leteurtre <tooney@videolan.org>
*
......@@ -392,7 +392,7 @@ s64 C_PvrMpegReader::Read(byte* pBuff, s64 iSize)
}
int C_PvrMpegReader::GetFrame(byte ** ppBuff , int iSize)
int C_PvrMpegReader::GetFrame(byte **, int)
{
return 0;
}
......@@ -405,7 +405,7 @@ int C_PvrMpegReader::GetFrame(byte ** ppBuff , int iSize)
//------------------------------------------------------------------------------
//
//------------------------------------------------------------------------------
s64 C_PvrMpegReader::Seek(s64 iOffset, s64 bStartPos)
s64 C_PvrMpegReader::Seek(s64, s64)
{
return 0;
}
......
......@@ -2,7 +2,7 @@
* tcpinput.cpp: Input for spawning a tcp reader
*-------------------------------------------------------------------------------
* (c)2003 Anevia
* $Id: tcpinput.cpp,v 1.3 2003/10/27 10:58:11 sam Exp $
* $Id$
*
* Authors: Damien Lucas <damien.lucas@anevia.com>
*
......@@ -400,8 +400,7 @@ void C_TcpInput::OnStopStreaming(C_Broadcast* pBroadcast)
//------------------------------------------------------------------------------
//
//------------------------------------------------------------------------------
void C_TcpInput::OnUpdateProgram(C_String strProgram,
C_String strFileName, C_String strType)
void C_TcpInput::OnUpdateProgram(C_String, C_String, C_String)
{
throw E_Exception(GEN_ERR, "Updating program not implemented");
}
......@@ -409,7 +408,7 @@ void C_TcpInput::OnUpdateProgram(C_String strProgram,
//------------------------------------------------------------------------------
//
//------------------------------------------------------------------------------
void C_TcpInput::OnDeleteProgram(C_String strProgram)
void C_TcpInput::OnDeleteProgram(C_String)
{
throw E_Exception(GEN_ERR, "Deleting program not implemented");
}
......@@ -2,7 +2,7 @@
* TCP reader.cpp: TCP reader
*-------------------------------------------------------------------------------
* (c)2003 Anevia
* $Id: tcpreader.cpp,v 1.3 2003/10/27 10:58:11 sam Exp $
* $Id$
*
* Authors: Damien Lucas <damien.lucas@anevia.com>
*
......@@ -144,7 +144,7 @@ void C_TcpMpegReader::ResetEndOfStream()
//------------------------------------------------------------------------------
//
//------------------------------------------------------------------------------
s64 C_TcpMpegReader::Seek(s64 iOffset, s64 bStartPos)
s64 C_TcpMpegReader::Seek(s64, s64)
{
ASSERT(false);
return 0;
......
......@@ -2,7 +2,7 @@
* TCPreader.h: TCP reader
*-------------------------------------------------------------------------------
* (c)2003 Anevia
* $Id: tcpreader.h,v 1.2 2003/08/29 10:20:53 nitrox Exp $
* $Id$
*
* Authors: Damien Lucas <damien.lucas@anevia.com>
*
......@@ -43,7 +43,7 @@ public:
virtual void Close();
virtual s64 Read(byte* pBuff, s64 iSize);
virtual int GetFrame(byte ** pBuff ,int iSize) { return 0;};
virtual int GetFrame(byte **,int) { return 0;};
virtual int GetAudioFD() { return 0;};
virtual s64 Seek(s64 iOffset, s64 bStartPos);
......
......@@ -2,7 +2,7 @@
* telnetinterface.cpp:
*-------------------------------------------------------------------------------
* (c)1999-2001 VideoLAN
* $Id: telnetinterface.cpp,v 1.6 2003/10/27 10:58:11 sam Exp $
* $Id$
*
* Authors: Benoit Steiner <benny@via.ecp.fr>
* Arnaud de Bossoreille de Ribou <bozo@via.ecp.fr>
......@@ -164,6 +164,7 @@ C_Buffer<byte> C_TelnetInterfaceOptions::Request(byte bAction, byte bOption)
C_Buffer<byte> C_TelnetInterfaceOptions::Answer(const C_Buffer<byte>& cRequest)
{
ASSERT(cRequest.GetSize() == 3);
(void)cRequest;
C_Buffer<byte> cAnswer(3);
cAnswer.SetSize(0);
......
......@@ -2,7 +2,7 @@
* videoinput.cpp: Video4linux streams
*-------------------------------------------------------------------------------
* (c)1999-2001 VideoLAN
* $Id: videoinput.cpp,v 1.22 2003/10/27 10:58:11 sam Exp $
* $Id$
*
* Authors: Arnaud de Bossoreille de Ribou <bozo@via.ecp.fr>
* Cyril Deguet <asmax@via.ecp.fr>
......@@ -392,14 +392,14 @@ void C_VideoInput::OnSuspendStreaming(C_Broadcast* pBroadcast)
//------------------------------------------------------------------------------
// Forward the reception of the given program
//------------------------------------------------------------------------------
void C_VideoInput::OnForwardStreaming(C_Broadcast* pBroadcast, int speed)
void C_VideoInput::OnForwardStreaming(C_Broadcast*, int)
{
}
//------------------------------------------------------------------------------
// Rewind the reception of the given program
//------------------------------------------------------------------------------
void C_VideoInput::OnRewindStreaming(C_Broadcast* pBroadcast, int speed)
void C_VideoInput::OnRewindStreaming(C_Broadcast*, int)
{
}
......@@ -434,11 +434,10 @@ void C_VideoInput::OnStopStreaming(C_Broadcast* pBroadcast)
//------------------------------------------------------------------------------
// Update configuration dynamically
//------------------------------------------------------------------------------
void C_VideoInput::OnUpdateProgram(C_String strProgram,
C_String strFileName, C_String strType)
void C_VideoInput::OnUpdateProgram(C_String, C_String, C_String)
{
}
void C_VideoInput::OnDeleteProgram(C_String strProgram)
void C_VideoInput::OnDeleteProgram(C_String)
{
}
......@@ -2,7 +2,7 @@
* converter.cpp: Mpeg converters
*-------------------------------------------------------------------------------
* (c)1999-2001 VideoLAN
* $Id: converter.cpp,v 1.8 2003/10/27 10:58:11 sam Exp $
* $Id$
*
* Authors: Arnaud de Bossoreille de Ribou <bozo@via.ecp.fr>
*
......@@ -114,7 +114,7 @@ void C_MpegConverter::CleanWork()
//------------------------------------------------------------------------------
// Get Next Ts Packet from the Reader
//------------------------------------------------------------------------------
s64 C_MpegConverter::GetNextTsPackets(C_Fifo<C_TsPacket> * pPackets, int skip)
s64 C_MpegConverter::GetNextTsPackets(C_Fifo<C_TsPacket> *, int)
{
return MPEG_ENDOFSTREAM;
}
......@@ -122,7 +122,7 @@ s64 C_MpegConverter::GetNextTsPackets(C_Fifo<C_TsPacket> * pPackets, int skip)
//------------------------------------------------------------------------------
// Get Previous Ts Packet from the Reader
//------------------------------------------------------------------------------
s64 C_MpegConverter::GetPrevTsPackets(C_Fifo<C_TsPacket> * pPackets, int skip)
s64 C_MpegConverter::GetPrevTsPackets(C_Fifo<C_TsPacket> *, int)
{
return MPEG_BEGINOFSTREAM;
}
......@@ -177,7 +177,7 @@ C_DvbPsiPat::C_DvbPsiPat(dvbpsi_pat_t* pPat)
//------------------------------------------------------------------------------
// Copy constructor
//------------------------------------------------------------------------------
C_DvbPsiPat::C_DvbPsiPat(const C_DvbPsiPat& cPat)
C_DvbPsiPat::C_DvbPsiPat(const C_DvbPsiPat& cPat) : C_DvbPsiTable ()
{
m_iPid = 0;
dvbpsi_InitPAT(&m_sPat,
......@@ -471,7 +471,7 @@ C_DvbPsiPmt::C_DvbPsiPmt(dvbpsi_pmt_t* pPmt)
//------------------------------------------------------------------------------
// Copy constructor
//------------------------------------------------------------------------------
C_DvbPsiPmt::C_DvbPsiPmt(const C_DvbPsiPmt& cPmt)
C_DvbPsiPmt::C_DvbPsiPmt(const C_DvbPsiPmt& cPmt) : C_DvbPsiTable()
{
m_iPid = cPmt.m_iPid;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment