Skip to content

Commit

Permalink
Fix compiler warnings in test_nif example
Browse files Browse the repository at this point in the history
Clang issues a couple compilation warnings for these functions since it
knows that they're not accessed outside of test_nif.c. This fixes the
warnings.
  • Loading branch information
fhunleth committed Sep 11, 2023
1 parent 960cca6 commit f113813
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions content/en/docs/tutorials/building_c_cpp.md
Expand Up @@ -43,7 +43,7 @@ Below is a NIF which has a function `repeat` that will take a `pid` and an Erlan
```c
#include "erl_nif.h"

ERL_NIF_TERM
static ERL_NIF_TERM
mk_atom(ErlNifEnv* env, const char* atom)
{
ERL_NIF_TERM ret;
Expand All @@ -56,7 +56,7 @@ mk_atom(ErlNifEnv* env, const char* atom)
return ret;
}

ERL_NIF_TERM
static ERL_NIF_TERM
mk_error(ErlNifEnv* env, const char* mesg)
{
return enif_make_tuple2(env, mk_atom(env, "error"), mk_atom(env, mesg));
Expand Down

0 comments on commit f113813

Please sign in to comment.