aboutsummaryrefslogtreecommitdiffstats
path: root/c_src/nif_helpers.c
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2017-04-19 14:48:57 +0200
committerLoïc Hoguin <[email protected]>2017-04-19 14:48:57 +0200
commit1947c4d7f32272ec0c5b9295808cde4c9138995c (patch)
tree18afdcdfc3ea21167d84f7d57f09eb8542dc0fb9 /c_src/nif_helpers.c
parent3d3a8dcdc9a2f45888059e69587dd07c45aa856a (diff)
downloadesdl2-1947c4d7f32272ec0c5b9295808cde4c9138995c.tar.gz
esdl2-1947c4d7f32272ec0c5b9295808cde4c9138995c.tar.bz2
esdl2-1947c4d7f32272ec0c5b9295808cde4c9138995c.zip
Fix warnings in preparation for splitting nif_helpers out
Diffstat (limited to 'c_src/nif_helpers.c')
-rw-r--r--c_src/nif_helpers.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/c_src/nif_helpers.c b/c_src/nif_helpers.c
index f1465da..0f98cd6 100644
--- a/c_src/nif_helpers.c
+++ b/c_src/nif_helpers.c
@@ -38,7 +38,7 @@ typedef struct {
// Message.
-nif_thread_message* nif_thread_message_alloc(void* f, nif_thread_arg* args, ErlNifPid* pid)
+static nif_thread_message* nif_thread_message_alloc(void* f, nif_thread_arg* args, ErlNifPid* pid)
{
nif_thread_message* msg = (nif_thread_message*)enif_alloc(sizeof(nif_thread_message));
@@ -49,7 +49,7 @@ nif_thread_message* nif_thread_message_alloc(void* f, nif_thread_arg* args, ErlN
return msg;
}
-void nif_thread_message_free(nif_thread_message* msg)
+static void nif_thread_message_free(nif_thread_message* msg)
{
enif_free(msg->from_pid);
enif_free(msg->args);
@@ -58,7 +58,7 @@ void nif_thread_message_free(nif_thread_message* msg)
// Calls and casts.
-ERL_NIF_TERM nif_thread_send(nif_thread_state* st, nif_thread_message* msg)
+static ERL_NIF_TERM nif_thread_send(nif_thread_state* st, nif_thread_message* msg)
{
enif_mutex_lock(st->lock);
@@ -107,7 +107,7 @@ ERL_NIF_TERM nif_thread_call(ErlNifEnv* env, ERL_NIF_TERM (*f)(ErlNifEnv*, nif_t
// Main thread loop.
-int nif_thread_receive(nif_thread_state* st, nif_thread_message** msg)
+static int nif_thread_receive(nif_thread_state* st, nif_thread_message** msg)
{
enif_mutex_lock(st->lock);
@@ -125,7 +125,7 @@ int nif_thread_receive(nif_thread_state* st, nif_thread_message** msg)
return 1;
}
-void nif_thread_handle(ErlNifEnv* env, nif_thread_state* st, nif_thread_message* msg)
+static void nif_thread_handle(ErlNifEnv* env, nif_thread_state* st, nif_thread_message* msg)
{
if (msg->from_pid == NULL) {
void (*cast)(nif_thread_arg*) = msg->function;
@@ -143,7 +143,7 @@ void nif_thread_handle(ErlNifEnv* env, nif_thread_state* st, nif_thread_message*
nif_thread_message_free(msg);
}
-void* nif_main_thread(void* obj)
+static void* nif_main_thread(void* obj)
{
ErlNifEnv* env = enif_alloc_env();
nif_thread_state* st = (nif_thread_state*)obj;