Skip to content

Commit

Permalink
fixed g++ 11.4.0 warnings (#4)
Browse files Browse the repository at this point in the history
  • Loading branch information
MetalKnight authored Aug 31, 2023
1 parent 8af6a59 commit dbe023a
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 16 deletions.
3 changes: 1 addition & 2 deletions main/nsmiracle/channel-module.cc
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ ChannelModule::~ChannelModule()
// // TCL command intepreter
int ChannelModule::command(int argc, const char* const* argv)
{
Tcl& tcl = Tcl::instance();
if (argc==3)
{
// install a SAP to an above module
Expand All @@ -62,7 +61,7 @@ int ChannelModule::command(int argc, const char* const* argv)

int ChannelModule::getChSAPnum()
{
Module::getUpLaySAPnum();
return Module::getUpLaySAPnum();
}

ChSAP* ChannelModule::getChSAP(int i)
Expand Down
22 changes: 11 additions & 11 deletions main/nsmiracle/clmessage.cc
Original file line number Diff line number Diff line change
Expand Up @@ -50,32 +50,32 @@ static unsigned int lastId = 0;
*/

ClMessage::ClMessage(int verbosity, ClMessage_t type)
: verbosity_(verbosity),
type_(type),
: type_(type),
destType_(BROADCAST),
source_(0),
dest_(CLBROADCASTADDR)
dest_(CLBROADCASTADDR),
verbosity_(verbosity)
{
uid_ = lastId++;
}

ClMessage::ClMessage(int verbosity, ClMessage_t type, DestinationType dtype, int source, int value)
: verbosity_(verbosity),
type_(type),
source_(source),
: type_(type),
destType_(dtype),
dest_(value)
source_(source),
dest_(value),
verbosity_(verbosity)
{
PRINT_WARNING_DEPRECATED_FUNCTION;
uid_ = lastId++;
}

ClMessage::ClMessage(int verbosity, ClMessage_t type, DestinationType dtype, int value)
: verbosity_(verbosity),
type_(type),
source_(-1),
: type_(type),
destType_(dtype),
dest_(value)
source_(-1),
dest_(value),
verbosity_(verbosity)
{
uid_ = lastId++;
}
Expand Down
2 changes: 1 addition & 1 deletion main/nsmiracle/initlib.cc
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ extern "C" int Miracle_Init()
}
extern "C" int Cygmiracle_Init()
{
Miracle_Init();
return Miracle_Init();
}


1 change: 0 additions & 1 deletion main/nsmiracle/module.cc
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ Module::~Module()
// // TCL command intepreter
int Module::command(int argc, const char* const* argv)
{
Tcl& tcl = Tcl::instance();
if (argc==3)
{
// install a SAP to an above module
Expand Down
2 changes: 1 addition & 1 deletion main/nsmiracle/plugin.cc
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ static class PlugInClass : public TclClass {
}
} class_plugin;

PlugIn::PlugIn() : clsap_(0), binPtr_(0), uLayerId_(0), stack_id(0), stats_ptr(NULL)
PlugIn::PlugIn() : binPtr_(NULL), stack_id(0), stats_ptr(NULL), clsap_(NULL), uLayerId_(0)
{
sprintf(tag_, "---");
}
Expand Down

0 comments on commit dbe023a

Please sign in to comment.