[Rpm-maint] [PATCH] Avoid warning about mbAppendStr if lui support isn't enabled.
Mark Wielaard
mark at klomp.org
Thu Oct 5 20:50:54 UTC 2017
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 at klomp.org>
---
rpmio/macro.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/rpmio/macro.c b/rpmio/macro.c
index 0f90aaf..b6d8900 100644
--- a/rpmio/macro.c
+++ b/rpmio/macro.c
@@ -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
--
1.8.3.1
More information about the Rpm-maint
mailing list