Skip to content

Commit

Permalink
Correction of GCC 13 errors and warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
titixbrest committed Oct 31, 2023
1 parent 19e3ea1 commit 15bdd4c
Show file tree
Hide file tree
Showing 62 changed files with 528 additions and 553 deletions.
12 changes: 6 additions & 6 deletions darkice/trunk/src/AlsaDspSource.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ AlsaDspSource :: isBigEndian ( void ) const throw ()
* Initialize the object
*----------------------------------------------------------------------------*/
void
AlsaDspSource :: init ( const char * name ) throw ( Exception )
AlsaDspSource :: init ( const char * name )
{
pcmName = Util::strDup( name);
captureHandle = 0;
Expand All @@ -91,7 +91,7 @@ AlsaDspSource :: init ( const char * name ) throw ( Exception )
* De-initialize the object
*----------------------------------------------------------------------------*/
void
AlsaDspSource :: strip ( void ) throw ( Exception )
AlsaDspSource :: strip ( void )
{
if ( isOpen() ) {
close();
Expand All @@ -105,7 +105,7 @@ AlsaDspSource :: strip ( void ) throw ( Exception )
* Open the audio source
*----------------------------------------------------------------------------*/
bool
AlsaDspSource :: open ( void ) throw ( Exception )
AlsaDspSource :: open ( void )
{
unsigned int u;
snd_pcm_format_t format;
Expand Down Expand Up @@ -214,7 +214,7 @@ AlsaDspSource :: open ( void ) throw ( Exception )
*----------------------------------------------------------------------------*/
bool
AlsaDspSource :: canRead ( unsigned int sec,
unsigned int usec ) throw ( Exception )
unsigned int usec )
{
if ( !isOpen() ) {
return false;
Expand Down Expand Up @@ -242,7 +242,7 @@ AlsaDspSource :: canRead ( unsigned int sec,
*----------------------------------------------------------------------------*/
unsigned int
AlsaDspSource :: read ( void * buf,
unsigned int len ) throw ( Exception )
unsigned int len )
{
snd_pcm_sframes_t ret;

Expand Down Expand Up @@ -284,7 +284,7 @@ AlsaDspSource :: read ( void * buf,
* Close the audio source
*----------------------------------------------------------------------------*/
void
AlsaDspSource :: close ( void ) throw ( Exception )
AlsaDspSource :: close ( void )
{
if ( !isOpen() ) {
return;
Expand Down
21 changes: 10 additions & 11 deletions darkice/trunk/src/AlsaDspSource.h
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ class AlsaDspSource : public AudioSource, public virtual Reporter
* @exception Exception
*/
inline
AlsaDspSource ( void ) throw ( Exception )
AlsaDspSource ( void )
{
throw Exception( __FILE__, __LINE__);
}
Expand All @@ -121,15 +121,15 @@ class AlsaDspSource : public AudioSource, public virtual Reporter
* @exception Exception
*/
void
init ( const char * name ) throw ( Exception );
init ( const char * name );

/**
* De-iitialize the object
*
* @exception Exception
*/
void
strip ( void ) throw ( Exception );
strip ( void );


public:
Expand All @@ -149,7 +149,6 @@ class AlsaDspSource : public AudioSource, public virtual Reporter
int sampleRate = 44100,
int bitsPerSample = 16,
int channel = 2 )
throw ( Exception )
: AudioSource( sampleRate, bitsPerSample, channel)
{
init( name);
Expand All @@ -162,7 +161,7 @@ class AlsaDspSource : public AudioSource, public virtual Reporter
* @exception Exception
*/
inline
AlsaDspSource ( const AlsaDspSource & ds ) throw ( Exception )
AlsaDspSource ( const AlsaDspSource & ds )
: AudioSource( ds )
{
init( ds.pcmName);
Expand All @@ -174,7 +173,7 @@ class AlsaDspSource : public AudioSource, public virtual Reporter
* @exception Exception
*/
inline virtual
~AlsaDspSource ( void ) throw ( Exception )
~AlsaDspSource ( void )
{
strip();
}
Expand All @@ -187,7 +186,7 @@ class AlsaDspSource : public AudioSource, public virtual Reporter
* @exception Exception
*/
inline virtual AlsaDspSource &
operator= ( const AlsaDspSource & ds ) throw ( Exception )
operator= ( const AlsaDspSource & ds )
{
if ( this != &ds ) {
strip();
Expand Down Expand Up @@ -217,7 +216,7 @@ class AlsaDspSource : public AudioSource, public virtual Reporter
* @see #read
*/
virtual bool
open ( void ) throw ( Exception );
open ( void );

/**
* Check if the AlsaDspSource is open.
Expand All @@ -243,7 +242,7 @@ class AlsaDspSource : public AudioSource, public virtual Reporter
*/
virtual bool
canRead ( unsigned int sec,
unsigned int usec ) throw ( Exception );
unsigned int usec );

/**
* Read from the AlsaDspSource.
Expand All @@ -256,15 +255,15 @@ class AlsaDspSource : public AudioSource, public virtual Reporter
*/
virtual unsigned int
read ( void * buf,
unsigned int len ) throw ( Exception );
unsigned int len );

/**
* Close the AlsaDspSource.
*
* @exception Exception
*/
virtual void
close ( void ) throw ( Exception );
close ( void );

/**
* Returns the buffer size in useconds.
Expand Down
18 changes: 8 additions & 10 deletions darkice/trunk/src/AudioEncoder.h
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ class AudioEncoder : public Sink, public virtual Referable
unsigned int outBitrate,
double outQuality,
unsigned int outSampleRate,
unsigned int outChannel ) throw ( Exception )
unsigned int outChannel )
{
this->sink = sink;
this->inSampleRate = inSampleRate;
Expand All @@ -169,7 +169,7 @@ class AudioEncoder : public Sink, public virtual Referable
* @exception Exception
*/
inline void
strip ( void ) throw ( Exception )
strip ( void )
{
}

Expand All @@ -182,7 +182,7 @@ class AudioEncoder : public Sink, public virtual Referable
* @exception Exception
*/
inline
AudioEncoder ( void ) throw ( Exception )
AudioEncoder ( void )
{
throw Exception( __FILE__, __LINE__);
}
Expand Down Expand Up @@ -215,7 +215,6 @@ class AudioEncoder : public Sink, public virtual Referable
double outQuality,
unsigned int outSampleRate = 0,
unsigned int outChannel = 0 )
throw ( Exception )
{
init ( sink,
inSampleRate,
Expand Down Expand Up @@ -252,7 +251,6 @@ class AudioEncoder : public Sink, public virtual Referable
double outQuality,
unsigned int outSampleRate = 0,
unsigned int outChannel = 0 )
throw ( Exception)
{
init( sink,
as->getSampleRate(),
Expand All @@ -272,7 +270,7 @@ class AudioEncoder : public Sink, public virtual Referable
* @param encoder the AudioEncoder to copy.
*/
inline
AudioEncoder ( const AudioEncoder & encoder ) throw ( Exception )
AudioEncoder ( const AudioEncoder & encoder )
{
init ( encoder.sink.get(),
encoder.inSampleRate,
Expand All @@ -294,7 +292,7 @@ class AudioEncoder : public Sink, public virtual Referable
* @exception Exception
*/
inline virtual AudioEncoder &
operator= ( const AudioEncoder & encoder ) throw ( Exception )
operator= ( const AudioEncoder & encoder )
{
if ( this != &encoder ) {
strip();
Expand Down Expand Up @@ -323,7 +321,7 @@ class AudioEncoder : public Sink, public virtual Referable
* @exception Exception
*/
inline virtual
~AudioEncoder ( void ) throw ( Exception )
~AudioEncoder ( void )
{
strip();
}
Expand Down Expand Up @@ -456,15 +454,15 @@ class AudioEncoder : public Sink, public virtual Referable
* @exception Exception
*/
virtual bool
start ( void ) throw ( Exception ) = 0;
start ( void ) = 0;

/**
* Stop encoding. Stops the encoding running in the background.
*
* @exception Exception
*/
virtual void
stop ( void ) throw ( Exception ) = 0;
stop ( void ) = 0;

/**
* Cut what the sink has been doing so far, and start anew.
Expand Down
1 change: 0 additions & 1 deletion darkice/trunk/src/AudioSource.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ AudioSource :: createDspSource( const char * deviceName,
int sampleRate,
int bitsPerSample,
int channel)
throw ( Exception )
{

if ( Util::strEq( deviceName, "/dev/tty", 8) ) {
Expand Down
13 changes: 6 additions & 7 deletions darkice/trunk/src/AudioSource.h
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ class AudioSource : public Source, public virtual Reporter
inline void
init ( unsigned int sampleRate,
unsigned int bitsPerSample,
unsigned int channel ) throw ( Exception )
unsigned int channel )
{
this->sampleRate = sampleRate;
this->bitsPerSample = bitsPerSample;
Expand All @@ -143,7 +143,7 @@ class AudioSource : public Source, public virtual Reporter
* @exception Exception
*/
inline void
strip ( void ) throw ( Exception )
strip ( void )
{
}

Expand All @@ -165,7 +165,6 @@ class AudioSource : public Source, public virtual Reporter
AudioSource ( unsigned int sampleRate = 44100,
unsigned int bitsPerSample = 16,
unsigned int channel = 2 )
throw ( Exception )
{
init ( sampleRate, bitsPerSample, channel);
}
Expand All @@ -177,7 +176,7 @@ class AudioSource : public Source, public virtual Reporter
* @exception Exception
*/
inline
AudioSource ( const AudioSource & as ) throw ( Exception )
AudioSource ( const AudioSource & as )
: Source( as )
{
init ( as.sampleRate, as.bitsPerSample, as.channel);
Expand All @@ -191,7 +190,7 @@ class AudioSource : public Source, public virtual Reporter
* @exception Exception
*/
inline virtual AudioSource &
operator= ( const AudioSource & as ) throw ( Exception )
operator= ( const AudioSource & as )
{
if ( this != &as ) {
strip();
Expand All @@ -211,7 +210,7 @@ class AudioSource : public Source, public virtual Reporter
* @exception Exception
*/
virtual inline
~AudioSource ( void ) throw ( Exception )
~AudioSource ( void )
{
}

Expand Down Expand Up @@ -296,7 +295,7 @@ class AudioSource : public Source, public virtual Reporter
const char * paSourceName,
int sampleRate = 44100,
int bitsPerSample = 16,
int channel = 2) throw ( Exception );
int channel = 2);

};

Expand Down
12 changes: 5 additions & 7 deletions darkice/trunk/src/BufferedSink.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ static const char fileid[] = "$Id$";
void
BufferedSink :: init ( Sink * sink,
unsigned int size,
unsigned int chunkSize ) throw ( Exception )
unsigned int chunkSize )
{
if ( !sink ) {
throw Exception( __FILE__, __LINE__, "no sink");
Expand All @@ -108,7 +108,6 @@ BufferedSink :: init ( Sink * sink,
* Copy Constructor
*----------------------------------------------------------------------------*/
BufferedSink :: BufferedSink ( const BufferedSink & buffer )
throw ( Exception )
{
init( buffer.sink.get(), buffer.bufferSize, buffer.chunkSize);

Expand All @@ -124,7 +123,7 @@ BufferedSink :: BufferedSink ( const BufferedSink & buffer )
* De-initalize the object
*----------------------------------------------------------------------------*/
void
BufferedSink :: strip ( void ) throw ( Exception )
BufferedSink :: strip ( void )
{
if ( isOpen() ) {
close();
Expand All @@ -140,7 +139,6 @@ BufferedSink :: strip ( void ) throw ( Exception )
*----------------------------------------------------------------------------*/
BufferedSink &
BufferedSink :: operator= ( const BufferedSink & buffer )
throw ( Exception )
{
if ( this != &buffer ) {
strip();
Expand Down Expand Up @@ -168,7 +166,7 @@ BufferedSink :: operator= ( const BufferedSink & buffer )
*----------------------------------------------------------------------------*/
unsigned int
BufferedSink :: store ( const void * buffer,
unsigned int bufferSize ) throw ( Exception )
unsigned int bufferSize )
{
const unsigned char * buf;
unsigned int size;
Expand Down Expand Up @@ -271,7 +269,7 @@ BufferedSink :: store ( const void * buffer,
*----------------------------------------------------------------------------*/
unsigned int
BufferedSink :: write ( const void * buf,
unsigned int len ) throw ( Exception )
unsigned int len )
{
unsigned int length = 0;
unsigned int soFar = 0;
Expand Down Expand Up @@ -420,7 +418,7 @@ BufferedSink :: write ( const void * buf,
* Close the sink, lose all pending data
*----------------------------------------------------------------------------*/
void
BufferedSink :: close ( void ) throw ( Exception )
BufferedSink :: close ( void )
{
if ( !isOpen() ) {
return;
Expand Down
Loading

0 comments on commit 15bdd4c

Please sign in to comment.