Re: [Rpm-maint] [PATCH] Avoid warning about mbAppendStr if lui support isn't enabled.
On 10/05/2017 11:50 PM, Mark Wielaard wrote: 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--- 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 This and the two rpmlog format patches applied. Thanks, - Panu - ___ Rpm-maint mailing list Rpm-maint@lists.rpm.org http://lists.rpm.org/mailman/listinfo/rpm-maint
[Rpm-maint] [PATCH] 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--- 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 ___ Rpm-maint mailing list Rpm-maint@lists.rpm.org http://lists.rpm.org/mailman/listinfo/rpm-maint