Browse Source

Cleanup compiler warnings.

tags/non-daw-v1.1.0
Jonathan Moore Liles 13 years ago
parent
commit
250b7db644
17 changed files with 69 additions and 57 deletions
  1. +4
    -0
      FL/Boxtypes.C
  2. +5
    -4
      mixer/src/Mixer.C
  3. +1
    -1
      mixer/src/Module.C
  4. +1
    -1
      mixer/src/NSM.C
  5. +5
    -3
      mixer/src/main.C
  6. +2
    -0
      nonlib/NSM/Client.C
  7. +2
    -2
      nonlib/NSM/Client.H
  8. +2
    -0
      nonlib/OSC/Endpoint.C
  9. +6
    -6
      nonlib/OSC/Endpoint.H
  10. +3
    -5
      session/src/nsmd.C
  11. +4
    -12
      session/src/send_osc.C
  12. +27
    -16
      session/src/session-manager.C
  13. +1
    -1
      timeline/src/Audio_Sequence.C
  14. +1
    -1
      timeline/src/NSM.C
  15. +2
    -2
      timeline/src/TLE.fl
  16. +1
    -1
      timeline/src/Timeline.C
  17. +2
    -2
      timeline/src/main.C

+ 4
- 0
FL/Boxtypes.C View File

@@ -17,6 +17,10 @@
/* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
/*******************************************************************************/


#pragma GCC diagnostic ignored "-Wchar-subscripts"


#include "Boxtypes.H"
#include <FL/fl_draw.H>
#include <string.h>


+ 5
- 4
mixer/src/Mixer.C View File

@@ -82,8 +82,9 @@ extern NSM_Client *nsm;
#define OSC_REPLY_OK() ((OSC::Endpoint*)user_data)->send( lo_message_get_source( msg ), path, 0, "OK" )
#define OSC_REPLY( value ) ((OSC::Endpoint*)user_data)->send( lo_message_get_source( msg ), path, value )
#define OSC_REPLY_ERR(errcode, value) ((OSC::Endpoint*)user_data)->send( lo_message_get_source( msg ), path,errcode, value )
#define OSC_ENDPOINT() ((OSC::Endpoint*)user_data)

OSC_HANDLER( add_strip )
static int osc_add_strip ( const char *path, const char *, lo_arg **, int , lo_message msg, void *user_data )
{
OSC_DMSG();

@@ -200,7 +201,7 @@ void Mixer::cb_menu(Fl_Widget* o) {

// read_line( user_config_dir, "default_path", &path );

const char *name = fl_dir_chooser( "Open Project", path, NULL );
const char *name = fl_dir_chooser( "Open Project", path );

free( path );

@@ -402,7 +403,7 @@ Mixer::init_osc ( const char *osc_port )
printf( "OSC=%s\n", osc_endpoint->url() );

osc_endpoint->add_method( "/non/mixer/add_strip", "", OSC_NAME( add_strip ), osc_endpoint, "" );
osc_endpoint->add_method( "/non/mixer/add_strip", "", osc_add_strip, osc_endpoint, "" );
// osc_endpoint->start();

@@ -712,7 +713,7 @@ Mixer::command_load ( const char *path, const char *display_name )
{
mixer->hide();

if ( int err = Project::open( path ) )
if ( Project::open( path ) )
{
// fl_alert( "Error opening project specified on commandline: %s", Project::errstr( err ) );
return false;


+ 1
- 1
mixer/src/Module.C View File

@@ -254,7 +254,7 @@ Module::Port::generate_osc_path ()
}

void
Module::Port::handle_signal_connection_state_changed ( OSC::Signal *s )
Module::Port::handle_signal_connection_state_changed ( OSC::Signal * )
{
module()->redraw();
}


+ 1
- 1
mixer/src/NSM.C View File

@@ -41,7 +41,7 @@ int
NSM_Client::command_broadcast ( const char *path, lo_message msg )
{
int argc = lo_message_get_argc( msg );
lo_arg **argv = lo_message_get_argv( msg );
// lo_arg **argv = lo_message_get_argv( msg );

if ( argc == 1 && !strcmp( path, "/non/finger" ) )
{


+ 5
- 3
mixer/src/main.C View File

@@ -81,7 +81,7 @@ ensure_dirs ( void )

#include <signal.h>

static void cb_main ( Fl_Double_Window *o, void *)
static void cb_main ( Fl_Double_Window *, void *)
{
if ( Fl::event() == FL_SHORTCUT && Fl::event_key() == FL_Escape )
return;
@@ -164,8 +164,10 @@ main ( int argc, char **argv )
{
main_window->xclass( APP_NAME );

Fl_Widget *o = mixer = new Mixer( 0, 0, main_window->w(), main_window->h(), NULL );
Fl_Group::current()->resizable(o);
{
Fl_Widget *o = mixer = new Mixer( 0, 0, main_window->w(), main_window->h(), NULL );
Fl_Group::current()->resizable(o);
}
}
o->end();



+ 2
- 0
nonlib/NSM/Client.C View File

@@ -24,6 +24,8 @@
#include <unistd.h>
#include <stdlib.h>

#pragma GCC diagnostic ignored "-Wunused-parameter"

namespace NSM
{



+ 2
- 2
nonlib/NSM/Client.H View File

@@ -88,12 +88,12 @@ namespace NSM
virtual int command_open ( const char *name, const char *display_name, const char *client_id, char **out_msg ) = 0;
virtual int command_save ( char **out_msg ) = 0;

virtual void command_active ( bool active ) { }
virtual void command_active ( bool ) { }

virtual void command_session_is_loaded ( void ) { }

/* invoked when an unrecognized message is received. Should return 0 if you handled it, -1 otherwise. */
virtual int command_broadcast ( const char *path, lo_message msg ) { return -1; }
virtual int command_broadcast ( const char *, lo_message ) { return -1; }

private:



+ 2
- 0
nonlib/OSC/Endpoint.C View File

@@ -28,6 +28,8 @@

#include "Thread.H"

#pragma GCC diagnostic ignored "-Wunused-parameter"

namespace OSC
{



+ 6
- 6
nonlib/OSC/Endpoint.H View File

@@ -364,12 +364,12 @@ namespace OSC
};

/* helper macros for defining OSC handlers */
#define OSC_NAME( name ) osc_ ## name
/* #define OSC_NAME( name ) osc_ ## name */
#define OSC_DMSG() DMESSAGE( "Got OSC message: %s", path );
#define OSC_HANDLER( name ) static int OSC_NAME( name ) ( const char *path, const char *types, lo_arg **argv, int argc, lo_message msg, void *user_data )
// #define OSC_HANDLER( name ) static int OSC_NAME( name ) ( const char *path, const char *types, lo_arg **argv, int argc, lo_message msg, void *user_data )


#define OSC_REPLY_OK() ((OSC::Endpoint*)user_data)->send( lo_message_get_source( msg ), path, "ok" )
#define OSC_REPLY( value ) ((OSC::Endpoint*)user_data)->send( lo_message_get_source( msg ), path, value )
#define OSC_REPLY_ERR() ((OSC::Endpoint*)user_data)->send( lo_message_get_source( msg ), path, "err" )
#define OSC_ENDPOINT() ((OSC::Endpoint*)user_data)
/* #define OSC_REPLY_OK() ((OSC::Endpoint*)user_data)->send( lo_message_get_source( msg ), path, "ok" ) */
/* #define OSC_REPLY( value ) ((OSC::Endpoint*)user_data)->send( lo_message_get_source( msg ), path, value ) */
/* #define OSC_REPLY_ERR() ((OSC::Endpoint*)user_data)->send( lo_message_get_source( msg ), path, "err" ) */
/* #define OSC_ENDPOINT() ((OSC::Endpoint*)user_data) */

+ 3
- 5
session/src/nsmd.C View File

@@ -304,7 +304,7 @@ mkpath ( const char *path, bool create_final_directory )

char *i = p + 1;

while ( i = index( i, '/' ) )
while ( ( i = index( i, '/' ) ) )
{
*i = 0;

@@ -1206,8 +1206,6 @@ OSC_HANDLER( duplicate )

// save_session_file();

const char *src = session_path;

char *spath;
asprintf( &spath, "%s/%s", session_root, &argv[0]->s );

@@ -1615,7 +1613,7 @@ OSC_HANDLER( error )
{
Client *c = get_client_by_address( lo_message_get_source( msg ) );

const char *rpath = &argv[0]->s;
// const char *rpath = &argv[0]->s;

int err_code = argv[1]->i;
@@ -1637,7 +1635,7 @@ OSC_HANDLER( reply )
{
Client *c = get_client_by_address( lo_message_get_source( msg ) );

const char *rpath = &argv[0]->s;
// const char *rpath = &argv[0]->s;
const char *message = &argv[1]->s;
if ( c )


+ 4
- 12
session/src/send_osc.C View File

@@ -26,23 +26,17 @@
#include <time.h>
#include <unistd.h>

/* helper macros for defining OSC handlers */
#define OSC_NAME( name ) osc_ ## name
// #define OSCDMSG() DMESSAGE( "Got OSC message: %s", path );
#define OSC_HANDLER( name ) static int OSC_NAME( name ) ( const char *path, const char *types, lo_arg **argv, int argc, lo_message msg, void *user_data )


static bool got_response = false;

/************************/
/* OSC Message Handlers */
/************************/

OSC_HANDLER( reply )
static int osc_reply ( const char *path, const char *types, lo_arg **argv, int argc, lo_message, void * )
{
// OSCDMSG();

printf( "Reply: " );
printf( "%s : ", path );

for ( int i = 0; i < argc; ++i )
{
@@ -73,11 +67,9 @@ int main(int argc, char *argv[])
{
OSC::Endpoint s;

s.init( NULL );

s.add_method( NULL, NULL, OSC_NAME( reply ), 0, "");
s.init( LO_UDP );

int r;
s.add_method( NULL, NULL, osc_reply, 0, "");

std::list<OSC::OSC_Value> args;



+ 27
- 16
session/src/session-manager.C View File

@@ -254,7 +254,7 @@ public:
};

void
browser_callback ( Fl_Widget *w, void *v )
browser_callback ( Fl_Widget *w, void * )
{
w->window()->hide();
}
@@ -731,8 +731,12 @@ public:

private:

static int osc_broadcast_handler ( const char *path, const char *types, lo_arg **argv, int argc, lo_message msg, void *user_data )
static int osc_broadcast_handler ( const char *path, const char *, lo_arg **, int argc, lo_message msg, void * )
{
if ( ! argc )
/* need at least one argument... */
return 0;

DMESSAGE( "Relaying broadcast" );

foreach_daemon( d )
@@ -760,7 +764,8 @@ private:
Fl::lock();

if ( !strcmp( path, "/nsm/gui/session/session" ) )
if ( !strcmp( path, "/nsm/gui/session/session" ) &&
! strcmp( types, "s" ) )
{
controller->add_session_to_list( &argv[0]->s );
controller->sort_sessions();
@@ -790,18 +795,20 @@ private:

osc->send( d->addr, "/nsm/server/list" );
}
else if ( !strcmp( path, "/nsm/gui/session/name" ))
else if ( !strcmp( path, "/nsm/gui/session/name" ) &&
!strcmp( types, "s" ))
{
controller->session_name( &argv[0]->s );
}
else if (!strcmp( path, "/error" ))
else if (!strcmp( path, "/error" ) &&
!strcmp( types, "sis" ) )
{
int err = argv[1]->i;

if ( err != 0 )
fl_alert( "Command %s failed with:\n\n%s", &argv[0]->s, &argv[2]->s );
}
else if (!strcmp( path, "/reply" ))
else if (!strcmp( path, "/reply" ) && argc && 's' == *types )
{
if ( !strcmp( &argv[0]->s, "/nsm/server/list" ) )
{
@@ -812,13 +819,14 @@ private:
{
last_ping_response = time( NULL );
}
else
else if ( ! strcmp( types, "ss" ) )
MESSAGE( "%s says %s", &argv[0]->s, &argv[1]->s);
}

if ( !strncmp( path, "/nsm/gui/client/", strlen( "/nsm/gui/client/" ) ) )
{
if ( !strcmp( path, "/nsm/gui/client/new" ))
if ( !strcmp( path, "/nsm/gui/client/new" ) &&
!strcmp( types, "ss" ) )
{
controller->client_new( &argv[0]->s, &argv[1]->s );
}
@@ -828,19 +836,23 @@ private:
if ( c )
{
if ( !strcmp( path, "/nsm/gui/client/status" ))
if ( !strcmp( path, "/nsm/gui/client/status" ) &&
!strcmp( types, "ss" ))
{
controller->client_pending_command( c, &argv[1]->s );
}
else if ( !strcmp( path, "/nsm/gui/client/progress" ))
else if ( !strcmp( path, "/nsm/gui/client/progress" ) &&
!strcmp( types, "sf" ))
{
c->progress( argv[1]->f );
}
else if ( !strcmp( path, "/nsm/gui/client/dirty" ))
else if ( !strcmp( path, "/nsm/gui/client/dirty" ) &&
!strcmp( types, "si" ))
{
c->dirty( argv[1]->i );
}
else if ( !strcmp( path, "/nsm/gui/client/switch" ) )
else if ( !strcmp( path, "/nsm/gui/client/switch" ) &&
!strcmp( types, "ss" ))
{
c->client_id( &argv[1]->s );
}
@@ -861,7 +873,7 @@ private:
static NSM_Controller *controller;

void
ping ( void *v )
ping ( void * )
{
controller->ping();
Fl::repeat_timeout( 1.0, ping, NULL );
@@ -907,7 +919,6 @@ main (int argc, char **argv )
int option_index = 0;
int c = 0;

const char *osc_port = NULL;
while ( ( c = getopt_long_only( argc, argv, "", long_options, &option_index ) ) != -1 )
{
switch ( c )
@@ -970,8 +981,8 @@ main (int argc, char **argv )
char **args = (char **)malloc( 4 + argc - option_index );

int i = 0;
args[i++] = "nsmd";
args[i++] = "--gui-url";
args[i++] = (char*)"nsmd";
args[i++] = (char*)"--gui-url";
args[i++] = url;



+ 1
- 1
timeline/src/Audio_Sequence.C View File

@@ -150,7 +150,7 @@ deurlify ( char *url )
*w = *r;
}

*w = NULL;
*w = 0;
}

void


+ 1
- 1
timeline/src/NSM.C View File

@@ -101,7 +101,7 @@ int
NSM_Client::command_broadcast ( const char *path, lo_message msg )
{
int argc = lo_message_get_argc( msg );
lo_arg **argv = lo_message_get_argv( msg );
// lo_arg **argv = lo_message_get_argv( msg );

if ( argc == 1 && !strcmp( path, "/non/finger" ) )
{


+ 2
- 2
timeline/src/TLE.fl View File

@@ -322,7 +322,7 @@ main_window->redraw();}

read_line( user_config_dir, "default_path", &path );

const char *name = fl_dir_chooser( "Open Project", path, NULL );
const char *name = fl_dir_chooser( "Open Project", path );

free( path );

@@ -863,7 +863,7 @@ project_name->redraw();} {}

((TLE*)v)->update_status();} {}
}
Function {capture_format_cb( Fl_Widget *w, void *v )} {private return_type {static void}
Function {capture_format_cb( Fl_Widget *, void *v )} {private return_type {static void}
} {
code {((TLE*)v)->capture_format_cb();} {}
}


+ 1
- 1
timeline/src/Timeline.C View File

@@ -1607,7 +1607,7 @@ Timeline::init_osc ( const char *osc_port )
}

int
Timeline::osc_non_hello ( const char *path, const char *types, lo_arg **argv, int argc, lo_message msg, void *user_data )
Timeline::osc_non_hello ( const char *path, const char *, lo_arg **argv, int argc, lo_message, void * )
{
OSC_DMSG();



+ 2
- 2
timeline/src/main.C View File

@@ -201,13 +201,13 @@ main ( int argc, char **argv )

tle->run();

timeline->init_osc( NULL );
timeline->init_osc( osc_port );

char *nsm_url = getenv( "NSM_URL" );

if ( nsm_url )
{
if ( ! nsm->init( nsm_url ) );
if ( ! nsm->init( nsm_url ) )
{
nsm->announce( APP_NAME, ":progress:switch:", argv[0] );



Loading…
Cancel
Save