eliminated warnings when compiling with GCC 4.3

git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/branches/lmms-mv@671 0778d3d1-df1d-0410-868b-ea421aaaa00d
This commit is contained in:
Tobias Doerffel
2008-01-24 11:21:22 +00:00
parent b0882c5924
commit a8d490d4cc
31 changed files with 107 additions and 37 deletions

View File

@@ -1,3 +1,47 @@
2008-01-24 Tobias Doerffel <tobydox/at/users/dot/sourceforge/dot/net>
* include/types.h:
replaced own buggy valueRanges-calculations by numeric_limits-class
* plugins/lb302/lb302.cpp:
fixed broken plugin-entry-point
* configure.in:
* plugins/bass_booster/bass_booster.cpp:
* plugins/bass_booster/bassbooster_controls.cpp:
* plugins/stk/mallets/mallets.cpp:
* include/automatable_model.h:
* include/journalling_object.h:
* src/audio/audio_file_device.cpp:
* src/audio/audio_alsa.cpp:
* src/audio/audio_oss.cpp:
* src/audio/audio_port.cpp:
* src/audio/audio_jack.cpp:
* src/midi/midi_alsa_seq.cpp:
* src/lib/project_journal.cpp:
* src/lib/mmp.cpp:
* src/lib/drumsynth.cpp:
* src/widgets/group_box.cpp:
* src/tracks/instrument_track.cpp:
* src/core/effect_chain.cpp:
* src/core/preset_preview_play_handle.cpp:
* src/core/effect_control_dialog.cpp:
* src/core/setup_dialog.cpp:
* src/core/main.cpp:
* src/core/mixer.cpp:
* src/core/effect.cpp:
* src/core/timeline.cpp:
* src/core/effect_select_dialog.cpp:
* src/core/automation_editor.cpp:
* src/core/meter_dialog.cpp:
various fixes for GCC 4.3
* README:
cleanups / fixes
* include/automatable_model.h:
cleanups / coding-style fixes
2008-01-24 Paul Giblock <pgllama/at/gmail/dot/dotcom>
* include/automatable_model.h:
@@ -14,7 +58,6 @@
split lb302 for M/V. However, lmms_plugin_main() receives null data,
which means the instrumentTrack cannot be set..
2008-01-18 Tobias Doerffel <tobydox/at/users/dot/sourceforge/dot/net>
* src/core/effect_chain.cpp:

5
README
View File

@@ -20,7 +20,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
What is LMMS??
What is LMMS?
--------------
LMMS aims to be a free alternative to popular (but commercial and closed-
@@ -47,8 +47,7 @@ least 500 MHz, but for really enjoying LMMS less than 1 GHz makes no sense...
Required libraries:
- multithreaded version of Qt 3.0 (at least 3.2 recommended) or higher with
devel-files
- Qt >= 4.3.0 with devel-files
Optional, but strongly recommended:
- JACK with devel-files

View File

@@ -574,9 +574,9 @@ lmmsdatadir="$datadir/$PACKAGE"
AC_SUBST(lmmsdatadir)
EXTRA_WARNINGS="-Wextra -Wno-unused-parameter -Wunsafe-loop-optimizations -Winline -Wdisabled-optimization"
EXTRA_WARNINGS="-Wextra -Wno-unused-parameter -Wunsafe-loop-optimizations -Wdisabled-optimization"
if test "x$CXX" == "xg++" ; then
CXXFLAGS="$CXXFLAGS -ansi -Wall $EXTRA_WARNINGS -fno-exceptions"
CXXFLAGS="-ansi -Wall $EXTRA_WARNINGS $CXXFLAGS -fno-exceptions"
fi
LDFLAGS="$LDFLAGS -L/usr/local/lib"

View File

@@ -279,8 +279,6 @@ public:
} ;
//#include "automatable_model_templates.h"
#define generateModelPrimitive(type,type2) \
typedef automatableModel<type,type2> type##Model; \
@@ -292,16 +290,21 @@ public:
generateModelPrimitive(float,float);
generateModelPrimitive(int,int);
class boolModel : public automatableModel<bool, signed char> {
class boolModel : public automatableModel<bool, signed char>
{
public:
boolModel( const bool _val = FALSE,
::model * _parent = NULL,
bool _default_constructed = FALSE ) :
automatableModel<bool, signed char>( _val, FALSE, TRUE, defaultRelStep(), _parent, _default_constructed )
{}
};
autoModel( _val, FALSE, TRUE, defaultRelStep(), _parent,
_default_constructed )
{
}
} ;
typedef automatableModelView<bool, signed char> boolModelView;
#endif

View File

@@ -105,7 +105,7 @@ public:
journallingObject( void );
virtual ~journallingObject();
inline const jo_id_t id( void ) const
inline jo_id_t id( void ) const
{
return( m_id );
}

View File

@@ -1,7 +1,7 @@
/*
* types.h - typedefs for common types that are used in the whole app
*
* Copyright (c) 2004-2006 Tobias Doerffel <tobydox/at/users.sourceforge.net>
* Copyright (c) 2004-2008 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
*
@@ -26,6 +26,8 @@
#ifndef _TYPES_H
#define _TYPES_H
#include <limits>
typedef unsigned char Uint8;
typedef signed char Sint8;
typedef unsigned short Uint16;
@@ -60,13 +62,15 @@ typedef Uint32 jo_id_t; // (unique) ID of a journalling object
template<typename T>
struct valueRanges
{
enum
static inline T min( void )
{
max = static_cast<T>( static_cast<T>( ~0 ) > 0 ?
~0 : ( ( ( T ) 1 << ( sizeof( T ) * 8 - 1 ) ) - 1 ) ),
min = static_cast<T>( static_cast<T>( ~0 ) > 0 ?
0 : ( -max - 1 ) )
} ;
return( std::numeric_limits<T>::min() );
}
static inline T max( void )
{
return( std::numeric_limits<T>::max() );
}
} ;

View File

@@ -24,6 +24,7 @@
#include "bass_booster.h"
#include "automatable_model_templates.h"
#undef SINGLE_SOURCE_COMPILE

View File

@@ -25,6 +25,7 @@
#include "bassbooster_controls.h"
#include "bass_booster.h"
#include "automatable_model_templates.h"

View File

@@ -73,7 +73,7 @@ malletsInstrument::malletsInstrument( instrumentTrack * _instrument_track ):
m_pressureModel(64.0f, 0.0f, 128.0f, 0.1f, this),
m_motionModel(64.0f, 0.0f, 128.0f, 0.1f, this),
m_velocityModel(64.0f, 0.0f, 128.0f, 0.1f, this),
m_strikeModel( FALSE, FALSE, TRUE, boolModel::defaultRelStep(), this ),
m_strikeModel( FALSE, this ),
m_presetsModel(this),
m_spreadModel(0, 0, 255, 1, this)
{

View File

@@ -3,7 +3,7 @@
/*
* audio_alsa.cpp - device-class which implements ALSA-PCM-output
*
* Copyright (c) 2004-2007 Tobias Doerffel <tobydox/at/users.sourceforge.net>
* Copyright (c) 2004-2008 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
*
@@ -36,6 +36,7 @@
#ifdef ALSA_SUPPORT
#include "endian_handling.h"
#include "automatable_model_templates.h"
#include "config_mgr.h"
#include "lcd_spinbox.h"
#include "gui_templates.h"

View File

@@ -4,7 +4,7 @@
* audio_file_device.cpp - base-class for audio-device-classes which write
* their output into a file
*
* Copyright (c) 2004-2007 Tobias Doerffel <tobydox/at/users.sourceforge.net>
* Copyright (c) 2004-2008 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
*
@@ -28,9 +28,9 @@
#include <QtGui/QMessageBox>
#include "audio_file_device.h"
#include "export_project_dialog.h"
#include "automatable_model_templates.h"
audioFileDevice::audioFileDevice( const sample_rate_t _sample_rate,

View File

@@ -3,7 +3,7 @@
/*
* audio_jack.cpp - support for JACK-transport
*
* Copyright (c) 2005-2007 Tobias Doerffel <tobydox/at/users.sourceforge.net>
* Copyright (c) 2005-2008 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
*
@@ -40,6 +40,7 @@
#include "debug.h"
#include "templates.h"
#include "automatable_model_templates.h"
#include "gui_templates.h"
#include "config_mgr.h"
#include "lcd_spinbox.h"

View File

@@ -3,7 +3,7 @@
/*
* audio_oss.cpp - device-class that implements OSS-PCM-output
*
* Copyright (c) 2004-2007 Tobias Doerffel <tobydox/at/users.sourceforge.net>
* Copyright (c) 2004-2008 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
*
@@ -35,6 +35,7 @@
#include <QtGui/QLineEdit>
#include "endian_handling.h"
#include "automatable_model_templates.h"
#include "lcd_spinbox.h"
#include "gui_templates.h"
#include "templates.h"

View File

@@ -31,6 +31,7 @@
#include "audio_port.h"
#include "audio_device.h"
#include "engine.h"
#include "automatable_model_templates.h"
audioPort::audioPort( const QString & _name, track * _track ) :

View File

@@ -49,6 +49,7 @@
#include "song_editor.h"
#include "automatable_model_templates.h"
#include "main_window.h"
#include "embed.h"
#include "engine.h"

View File

@@ -31,6 +31,7 @@
#include "dummy_effect.h"
#include "effect_chain.h"
#include "effect_view.h"
#include "automatable_model_templates.h"
effect::effect( const plugin::descriptor * _desc,

View File

@@ -28,6 +28,7 @@
#include "effect_chain.h"
#include "engine.h"
#include "automatable_model_templates.h"

View File

@@ -32,6 +32,7 @@
#include "effect_control_dialog.h"
#include "effect_controls.h"
#include "effect.h"
#include "automatable_model_templates.h"
effectControlDialog::effectControlDialog( effectControls * _controls ) :

View File

@@ -3,7 +3,7 @@
/*
* effect_select_dialog.cpp - dialog to choose effect plugin
*
* Copyright (c) 2006-2007 Tobias Doerffel <tobydox/at/users.sourceforge.net>
* Copyright (c) 2006-2008 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
*
@@ -33,6 +33,7 @@
#include "effect_select_dialog.h"
#include "gui_templates.h"
#include "automatable_model_templates.h"
#include "embed.h"

View File

@@ -3,7 +3,7 @@
/*
* main.cpp - just main.cpp which is starting up app...
*
* Copyright (c) 2004-2007 Tobias Doerffel <tobydox/at/users.sourceforge.net>
* Copyright (c) 2004-2008 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
*
@@ -43,6 +43,7 @@
#include "export_project_dialog.h"
#include "song_editor.h"
#include "gui_templates.h"
#include "automatable_model_templates.h"
#warning TODO: move somewhere else
static inline QString baseName( const QString & _file )

View File

@@ -31,6 +31,7 @@
#include "meter_dialog.h"
#include "embed.h"
#include "gui_templates.h"
#include "automatable_model_templates.h"
meterDialog::meterDialog( QWidget * _parent, track * _track ):

View File

@@ -3,7 +3,7 @@
/*
* mixer.cpp - audio-device-independent mixer for LMMS
*
* Copyright (c) 2004-2007 Tobias Doerffel <tobydox/at/users.sourceforge.net>
* Copyright (c) 2004-2008 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
*
@@ -39,6 +39,7 @@
#include "sample_play_handle.h"
#include "piano_roll.h"
#include "micro_timer.h"
#include "automatable_model_templates.h"
#include "audio_device.h"
#include "midi_client.h"

View File

@@ -144,7 +144,7 @@ presetPreviewPlayHandle::presetPreviewPlayHandle(
// create note-play-handle for it
m_previewNote = new notePlayHandle(
s_previewTC->previewInstrumentTrack(), 0,
valueRanges<f_cnt_t>::max / 2,
valueRanges<f_cnt_t>::max() / 2,
note( 0, 0, static_cast<tones>( A ),
static_cast<octaves>( DEFAULT_OCTAVE - 1 ), 100 ) );

View File

@@ -3,7 +3,7 @@
/*
* setup_dialog.cpp - dialog for setting up LMMS
*
* Copyright (c) 2005-2007 Tobias Doerffel <tobydox/at/users.sourceforge.net>
* Copyright (c) 2005-2008 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
*
@@ -49,6 +49,7 @@
#include "tooltip.h"
#include "led_checkbox.h"
#include "lcd_spinbox.h"
#include "automatable_model_templates.h"
// platform-specific audio-interface-classes

View File

@@ -3,7 +3,7 @@
/*
* timeline.cpp - class timeLine, representing a time-line with position marker
*
* Copyright (c) 2004-2007 Tobias Doerffel <tobydox/at/users.sourceforge.net>
* Copyright (c) 2004-2008 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
*
@@ -40,6 +40,7 @@
#include "nstate_button.h"
#include "main_window.h"
#include "text_float.h"
#include "automatable_model_templates.h"

View File

@@ -27,7 +27,8 @@
#include "drumsynth.h"
#include <fstream>
#include <string>
#include <cstring>
#include <limits>
#include <math.h> //sin(), exp(), etc.
#include <stdio.h> //sscanf(), sprintf()

View File

@@ -36,6 +36,7 @@
#include "config_mgr.h"
#include "project_version.h"
#include "song_editor.h"
#include "automatable_model_templates.h"
multimediaProject::typeDescStruct

View File

@@ -3,7 +3,7 @@
/*
* project_journal.cpp - implementation of project-journal
*
* Copyright (c) 2006-2007 Tobias Doerffel <tobydox/at/users.sourceforge.net>
* Copyright (c) 2006-2008 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
*
@@ -31,6 +31,7 @@
#include "engine.h"
#include "journalling_object.h"
#include "song_editor.h"
#include "automatable_model_templates.h"
projectJournal::projectJournal( void ) :

View File

@@ -3,7 +3,7 @@
/*
* midi_alsa_seq.cpp - ALSA-sequencer-client
*
* Copyright (c) 2005-2007 Tobias Doerffel <tobydox/at/users.sourceforge.net>
* Copyright (c) 2005-2008 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
*
@@ -36,6 +36,7 @@
#include "song_editor.h"
#include "midi_port.h"
#include "note.h"
#include "automatable_model_templates.h"
#ifdef ALSA_SUPPORT

View File

@@ -500,7 +500,7 @@ void instrumentTrack::processInEvent( const midiEvent & _me,
notePlayHandle( this,
_time.frames(
engine::framesPerTact64th() ),
valueRanges<f_cnt_t>::max / 2,
valueRanges<f_cnt_t>::max() / 2,
n );
if( engine::getMixer()->addPlayHandle(
nph ) )
@@ -734,7 +734,7 @@ void instrumentTrack::setName( const QString & _new_name )
for( int i = 0; i < numOfTCOs(); ++i )
{
pattern * p = dynamic_cast<pattern *>( getTCO( i ) );
if( p != NULL && p->name() == m_name || p->name() == "" )
if( ( p != NULL && p->name() == m_name ) || p->name() == "" )
{
p->setName( _new_name );
}

View File

@@ -42,6 +42,7 @@
#include "embed.h"
#include "gui_templates.h"
#include "automatable_model_templates.h"
QPixmap * groupBox::s_ledBg = NULL;