Commit 9e5d1909 authored by Gaël PORTAY's avatar Gaël PORTAY
Browse files

Fix initialization of members from default constructors.

parent ddf1b5a1
......@@ -163,8 +163,10 @@ struct JackClientCheckRequest : public JackRequest
int fUUID;
int fOpen;
JackClientCheckRequest()
{}
JackClientCheckRequest() : fProtocol(0), fOptions(0), fUUID(0), fOpen(0)
{
memset(fName, 0, sizeof(fName));
}
JackClientCheckRequest(const char* name, int protocol, int options, int uuid, int open = false)
: JackRequest(JackRequest::kClientCheck), fProtocol(protocol), fOptions(options), fUUID(uuid), fOpen(open)
{
......@@ -207,7 +209,9 @@ struct JackClientCheckResult : public JackResult
int fStatus;
JackClientCheckResult(): JackResult(), fStatus(0)
{}
{
memset(fName, 0, sizeof(fName));
}
JackClientCheckResult(int32_t result, const char* name, int status)
: JackResult(result), fStatus(status)
{
......@@ -244,8 +248,10 @@ struct JackClientOpenRequest : public JackRequest
int fUUID;
char fName[JACK_CLIENT_NAME_SIZE+1];
JackClientOpenRequest()
{}
JackClientOpenRequest() : fPID(0), fUUID(0)
{
memset(fName, 0, sizeof(fName));
}
JackClientOpenRequest(const char* name, int pid, int uuid): JackRequest(JackRequest::kClientOpen)
{
memset(fName, 0, sizeof(fName));
......@@ -321,7 +327,7 @@ struct JackClientCloseRequest : public JackRequest
int fRefNum;
JackClientCloseRequest()
JackClientCloseRequest() : fRefNum(0)
{}
JackClientCloseRequest(int refnum): JackRequest(JackRequest::kClientClose), fRefNum(refnum)
{}
......@@ -351,7 +357,7 @@ struct JackActivateRequest : public JackRequest
int fRefNum;
int fIsRealTime;
JackActivateRequest()
JackActivateRequest() : fRefNum(0), fIsRealTime(0)
{}
JackActivateRequest(int refnum, int is_real_time)
: JackRequest(JackRequest::kActivateClient), fRefNum(refnum), fIsRealTime(is_real_time)
......@@ -383,7 +389,7 @@ struct JackDeactivateRequest : public JackRequest
int fRefNum;
JackDeactivateRequest()
JackDeactivateRequest() : fRefNum(0)
{}
JackDeactivateRequest(int refnum): JackRequest(JackRequest::kDeactivateClient), fRefNum(refnum)
{}
......@@ -416,8 +422,11 @@ struct JackPortRegisterRequest : public JackRequest
unsigned int fFlags;
unsigned int fBufferSize;
JackPortRegisterRequest()
{}
JackPortRegisterRequest() : fRefNum(0), fFlags(0), fBufferSize(0)
{
memset(fName, 0, sizeof(fName));
memset(fPortType, 0, sizeof(fPortType));
}
JackPortRegisterRequest(int refnum, const char* name, const char* port_type, unsigned int flags, unsigned int buffer_size)
: JackRequest(JackRequest::kRegisterPort), fRefNum(refnum), fFlags(flags), fBufferSize(buffer_size)
{
......@@ -489,7 +498,7 @@ struct JackPortUnRegisterRequest : public JackRequest
int fRefNum;
jack_port_id_t fPortIndex;
JackPortUnRegisterRequest()
JackPortUnRegisterRequest() : fRefNum(0), fPortIndex(0)
{}
JackPortUnRegisterRequest(int refnum, jack_port_id_t index)
: JackRequest(JackRequest::kUnRegisterPort), fRefNum(refnum), fPortIndex(index)
......@@ -525,8 +534,11 @@ struct JackPortConnectNameRequest : public JackRequest
char fSrc[REAL_JACK_PORT_NAME_SIZE+1]; // port full name
char fDst[REAL_JACK_PORT_NAME_SIZE+1]; // port full name
JackPortConnectNameRequest()
{}
JackPortConnectNameRequest() : fRefNum(0)
{
memset(fSrc, 0, sizeof(fSrc));
memset(fDst, 0, sizeof(fDst));
}
JackPortConnectNameRequest(int refnum, const char* src_name, const char* dst_name)
: JackRequest(JackRequest::kConnectNamePorts), fRefNum(refnum)
{
......@@ -569,8 +581,11 @@ struct JackPortDisconnectNameRequest : public JackRequest
char fSrc[REAL_JACK_PORT_NAME_SIZE+1]; // port full name
char fDst[REAL_JACK_PORT_NAME_SIZE+1]; // port full name
JackPortDisconnectNameRequest()
{}
JackPortDisconnectNameRequest() : fRefNum(0)
{
memset(fSrc, 0, sizeof(fSrc));
memset(fDst, 0, sizeof(fDst));
}
JackPortDisconnectNameRequest(int refnum, const char* src_name, const char* dst_name)
: JackRequest(JackRequest::kDisconnectNamePorts), fRefNum(refnum)
{
......@@ -613,7 +628,7 @@ struct JackPortConnectRequest : public JackRequest
jack_port_id_t fSrc;
jack_port_id_t fDst;
JackPortConnectRequest()
JackPortConnectRequest() : fRefNum(0), fSrc(0), fDst(0)
{}
JackPortConnectRequest(int refnum, jack_port_id_t src, jack_port_id_t dst)
: JackRequest(JackRequest::kConnectPorts), fRefNum(refnum), fSrc(src), fDst(dst)
......@@ -651,7 +666,7 @@ struct JackPortDisconnectRequest : public JackRequest
jack_port_id_t fSrc;
jack_port_id_t fDst;
JackPortDisconnectRequest()
JackPortDisconnectRequest() : fRefNum(0), fSrc(0), fDst(0)
{}
JackPortDisconnectRequest(int refnum, jack_port_id_t src, jack_port_id_t dst)
: JackRequest(JackRequest::kDisconnectPorts), fRefNum(refnum), fSrc(src), fDst(dst)
......@@ -689,8 +704,10 @@ struct JackPortRenameRequest : public JackRequest
jack_port_id_t fPort;
char fName[JACK_PORT_NAME_SIZE + 1]; // port short name
JackPortRenameRequest()
{}
JackPortRenameRequest() : fRefNum(0), fPort(0)
{
memset(fName, 0, sizeof(fName));
}
JackPortRenameRequest(int refnum, jack_port_id_t port, const char* name)
: JackRequest(JackRequest::kPortRename), fRefNum(refnum), fPort(port)
{
......@@ -729,7 +746,7 @@ struct JackSetBufferSizeRequest : public JackRequest
jack_nframes_t fBufferSize;
JackSetBufferSizeRequest()
JackSetBufferSizeRequest() : fBufferSize(0)
{}
JackSetBufferSizeRequest(jack_nframes_t buffer_size)
: JackRequest(JackRequest::kSetBufferSize), fBufferSize(buffer_size)
......@@ -759,7 +776,7 @@ struct JackSetFreeWheelRequest : public JackRequest
int fOnOff;
JackSetFreeWheelRequest()
JackSetFreeWheelRequest() : fOnOff(0)
{}
JackSetFreeWheelRequest(int onoff)
: JackRequest(JackRequest::kSetFreeWheel), fOnOff(onoff)
......@@ -816,7 +833,7 @@ struct JackReleaseTimebaseRequest : public JackRequest
int fRefNum;
JackReleaseTimebaseRequest()
JackReleaseTimebaseRequest() : fRefNum(0)
{}
JackReleaseTimebaseRequest(int refnum)
: JackRequest(JackRequest::kReleaseTimebase), fRefNum(refnum)
......@@ -848,7 +865,7 @@ struct JackSetTimebaseCallbackRequest : public JackRequest
int fRefNum;
int fConditionnal;
JackSetTimebaseCallbackRequest()
JackSetTimebaseCallbackRequest() : fRefNum(0), fConditionnal(0)
{}
JackSetTimebaseCallbackRequest(int refnum, int conditional)
: JackRequest(JackRequest::kSetTimebaseCallback), fRefNum(refnum), fConditionnal(conditional)
......@@ -881,7 +898,7 @@ struct JackGetInternalClientNameRequest : public JackRequest
int fRefNum;
int fIntRefNum;
JackGetInternalClientNameRequest()
JackGetInternalClientNameRequest() : fRefNum(0), fIntRefNum(0)
{}
JackGetInternalClientNameRequest(int refnum, int int_ref)
: JackRequest(JackRequest::kGetInternalClientName), fRefNum(refnum), fIntRefNum(int_ref)
......@@ -914,7 +931,9 @@ struct JackGetInternalClientNameResult : public JackResult
char fName[JACK_CLIENT_NAME_SIZE+1];
JackGetInternalClientNameResult(): JackResult()
{}
{
memset(fName, 0, sizeof(fName));
}
JackGetInternalClientNameResult(int32_t result, const char* name)
: JackResult(result)
{
......@@ -949,8 +968,10 @@ struct JackInternalClientHandleRequest : public JackRequest
int fRefNum;
char fName[JACK_CLIENT_NAME_SIZE+1];
JackInternalClientHandleRequest()
{}
JackInternalClientHandleRequest() : fRefNum(0)
{
memset(fName, 0, sizeof(fName));
}
JackInternalClientHandleRequest(int refnum, const char* client_name)
: JackRequest(JackRequest::kInternalClientHandle), fRefNum(refnum)
{
......@@ -985,7 +1006,7 @@ struct JackInternalClientHandleResult : public JackResult
int fStatus;
int fIntRefNum;
JackInternalClientHandleResult(): JackResult()
JackInternalClientHandleResult(): JackResult(), fStatus(0), fIntRefNum(0)
{}
JackInternalClientHandleResult(int32_t result, int status, int int_ref)
: JackResult(result), fStatus(status), fIntRefNum(int_ref)
......@@ -1028,8 +1049,12 @@ struct JackInternalClientLoadRequest : public JackRequest
int fOptions;
int fUUID;
JackInternalClientLoadRequest()
{}
JackInternalClientLoadRequest() : fRefNum(0), fOptions(0), fUUID(0)
{
memset(fName, 0, sizeof(fName));
memset(fDllName, 0, sizeof(fDllName));
memset(fLoadInitName, 0, sizeof(fLoadInitName));
}
JackInternalClientLoadRequest(int refnum, const char* client_name, const char* so_name, const char* objet_data, int options, int uuid )
: JackRequest(JackRequest::kInternalClientLoad), fRefNum(refnum), fOptions(options), fUUID(uuid)
{
......@@ -1077,7 +1102,7 @@ struct JackInternalClientLoadResult : public JackResult
int fStatus;
int fIntRefNum;
JackInternalClientLoadResult(): JackResult()
JackInternalClientLoadResult(): JackResult(), fStatus(0), fIntRefNum(0)
{}
JackInternalClientLoadResult(int32_t result, int status, int int_ref)
: JackResult(result), fStatus(status), fIntRefNum(int_ref)
......@@ -1112,7 +1137,7 @@ struct JackInternalClientUnloadRequest : public JackRequest
int fRefNum;
int fIntRefNum;
JackInternalClientUnloadRequest()
JackInternalClientUnloadRequest() : fRefNum(0), fIntRefNum(0)
{}
JackInternalClientUnloadRequest(int refnum, int int_ref)
: JackRequest(JackRequest::kInternalClientUnload), fRefNum(refnum), fIntRefNum(int_ref)
......@@ -1144,7 +1169,7 @@ struct JackInternalClientUnloadResult : public JackResult
int fStatus;
JackInternalClientUnloadResult(): JackResult()
JackInternalClientUnloadResult(): JackResult(), fStatus(0)
{}
JackInternalClientUnloadResult(int32_t result, int status)
: JackResult(result), fStatus(status)
......@@ -1178,7 +1203,7 @@ struct JackClientNotificationRequest : public JackRequest
int fNotify;
int fValue;
JackClientNotificationRequest()
JackClientNotificationRequest() : fRefNum(0), fNotify(0), fValue(0)
{}
JackClientNotificationRequest(int refnum, int notify, int value)
: JackRequest(JackRequest::kNotification), fRefNum(refnum), fNotify(notify), fValue(value)
......@@ -1213,9 +1238,12 @@ struct JackSessionCommand
char fCommand[JACK_SESSION_COMMAND_SIZE];
jack_session_flags_t fFlags;
JackSessionCommand()
{}
JackSessionCommand() : fFlags(JackSessionSaveError)
{
memset(fUUID, 0, sizeof(fUUID));
memset(fClientName, 0, sizeof(fClientName));
memset(fCommand, 0, sizeof(fCommand));
}
JackSessionCommand(const char *uuid, const char *clientname, const char *command, jack_session_flags_t flags)
{
memset(fUUID, 0, sizeof(fUUID));
......@@ -1328,7 +1356,7 @@ struct JackSessionNotifyRequest : public JackRequest
jack_session_event_type_t fEventType;
int fRefNum;
JackSessionNotifyRequest()
JackSessionNotifyRequest() : fEventType(JackSessionSave), fRefNum(0)
{}
JackSessionNotifyRequest(int refnum, const char* path, jack_session_event_type_t type, const char* dst)
: JackRequest(JackRequest::kSessionNotify), fEventType(type), fRefNum(refnum)
......@@ -1370,7 +1398,7 @@ struct JackSessionReplyRequest : public JackRequest
{
int fRefNum;
JackSessionReplyRequest()
JackSessionReplyRequest() : fRefNum(0)
{}
JackSessionReplyRequest(int refnum)
......@@ -1400,7 +1428,9 @@ struct JackClientNameResult : public JackResult
char fName[JACK_CLIENT_NAME_SIZE+1];
JackClientNameResult(): JackResult()
{}
{
memset(fName, 0, sizeof(fName));
}
JackClientNameResult(int32_t result, const char* name)
: JackResult(result)
{
......@@ -1429,7 +1459,9 @@ struct JackUUIDResult : public JackResult
char fUUID[JACK_UUID_SIZE];
JackUUIDResult(): JackResult()
{}
{
memset(fUUID, 0, sizeof(fUUID));
}
JackUUIDResult(int32_t result, const char* uuid)
: JackResult(result)
{
......@@ -1458,7 +1490,9 @@ struct JackGetUUIDRequest : public JackRequest
char fName[JACK_CLIENT_NAME_SIZE+1];
JackGetUUIDRequest()
{}
{
memset(fName, 0, sizeof(fName));
}
JackGetUUIDRequest(const char* client_name)
: JackRequest(JackRequest::kGetUUIDByClient)
......@@ -1490,7 +1524,9 @@ struct JackGetClientNameRequest : public JackRequest
char fUUID[JACK_UUID_SIZE];
JackGetClientNameRequest()
{}
{
memset(fUUID, 0, sizeof(fUUID));
}
JackGetClientNameRequest(const char* uuid)
: JackRequest(JackRequest::kGetClientByUUID)
......@@ -1523,8 +1559,11 @@ struct JackReserveNameRequest : public JackRequest
char fName[JACK_CLIENT_NAME_SIZE+1];
char fUUID[JACK_UUID_SIZE];
JackReserveNameRequest()
{}
JackReserveNameRequest() : fRefNum(0)
{
memset(fName, 0, sizeof(fName));
memset(fUUID, 0, sizeof(fUUID));
}
JackReserveNameRequest(int refnum, const char *name, const char* uuid)
: JackRequest(JackRequest::kReserveClientName), fRefNum(refnum)
......@@ -1562,7 +1601,9 @@ struct JackClientHasSessionCallbackRequest : public JackRequest
char fName[JACK_CLIENT_NAME_SIZE+1];
JackClientHasSessionCallbackRequest()
{}
{
memset(fName, 0, sizeof(fName));
}
JackClientHasSessionCallbackRequest(const char *name)
: JackRequest(JackRequest::kClientHasSessionCallback)
......@@ -1604,8 +1645,11 @@ struct JackClientNotification
int fSync;
char fMessage[JACK_MESSAGE_SIZE+1];
JackClientNotification(): fNotify(-1), fValue1(-1), fValue2(-1)
{}
JackClientNotification(): fSize(0), fRefNum(0), fNotify(-1), fValue1(-1), fValue2(-1), fSync(0)
{
memset(fName, 0, sizeof(fName));
memset(fMessage, 0, sizeof(fMessage));
}
JackClientNotification(const char* name, int refnum, int notify, int sync, const char* message, int value1, int value2)
: fRefNum(refnum), fNotify(notify), fValue1(value1), fValue2(value2), fSync(sync)
{
......
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