Commit 9cf490ad authored by sletz's avatar sletz
Browse files

Fix for compilation warning with GCC 4.3.2

git-svn-id: http://subversion.jackaudio.org/jack/jack2/trunk/jackmp@3290 0c269be4-1314-0410-8aa9-9f06e86f4224
parent 70bc4a03
......@@ -473,9 +473,7 @@ do_nothing_handler(int sig)
another signal.
*/
char buf[64];
snprintf (buf, sizeof(buf),
"received signal %d during shutdown (ignored)\n", sig);
write (1, buf, strlen (buf));
snprintf (buf, sizeof(buf), "received signal %d during shutdown (ignored)\n", sig);
}
EXPORT sigset_t
......
......@@ -98,7 +98,7 @@ struct SERVER_EXPORT JackEngineControl : public JackShmMem
fSpareUsecs = 0;
fMaxUsecs = 0;
ResetRollingUsecs();
snprintf(fServerName, sizeof(fServerName), server_name);
strncpy(fServerName, server_name, sizeof(fServerName));
fPeriod = 0;
fComputation = 0;
fConstraint = 0;
......
......@@ -121,7 +121,7 @@ int JackInternalClient::Open(const char* server_name, const char* name, jack_opt
char name_res[JACK_CLIENT_NAME_SIZE + 1];
jack_log("JackInternalClient::Open name = %s", name);
snprintf(fServerName, sizeof(fServerName), server_name);
strncpy(fServerName, server_name, sizeof(fServerName));
fChannel->ClientCheck(name, name_res, JACK_PROTOCOL_VERSION, (int)options, (int*)status, &result);
if (result < 0) {
......@@ -233,7 +233,7 @@ int JackLoadableInternalClient2::Init(const char* so_name)
JackLoadableInternalClient1::JackLoadableInternalClient1(JackServer* server, JackSynchro* table, const char* object_data)
: JackLoadableInternalClient(server, table)
{
snprintf(fObjectData, JACK_LOAD_INIT_LIMIT, object_data);
strncpy(fObjectData, object_data, JACK_LOAD_INIT_LIMIT);
}
JackLoadableInternalClient2::JackLoadableInternalClient2(JackServer* server, JackSynchro* table, const JSList* parameters)
......
......@@ -72,7 +72,7 @@ int JackLibClient::Open(const char* server_name, const char* name, jack_options_
int shared_engine, shared_client, shared_graph, result;
jack_log("JackLibClient::Open name = %s", name);
snprintf(fServerName, sizeof(fServerName), server_name);
strncpy(fServerName, server_name, sizeof(fServerName));
// Open server/client channel
char name_res[JACK_CLIENT_NAME_SIZE + 1];
......
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