Avoid warning about mbAppendStr if lui support isn't enabled.

Guard the whole mbAppendStr function with ifdef WITH_LUA to avoid a
warning when lua support isn't enabled because it is only used inside
the doLua function (which is empty unles WITH_LUA is defined).

Signed-off-by: Mark Wielaard <mark@klomp.org>
This commit is contained in:
Mark Wielaard 2017-10-05 22:50:54 +02:00 committed by Panu Matilainen
parent fef72734dc
commit 62bde9545a
1 changed files with 3 additions and 0 deletions

View File

@ -394,6 +394,7 @@ static void mbAppend(MacroBuf mb, char c)
mb->nb--;
}
#ifdef WITH_LUA
static void mbAppendStr(MacroBuf mb, const char *str)
{
size_t len = strlen(str);
@ -405,6 +406,8 @@ static void mbAppendStr(MacroBuf mb, const char *str)
mb->tpos += len;
mb->nb -= len;
}
#endif
/**
* Expand output of shell command into target buffer.
* @param mb macro expansion state