[Rpm-maint] [PATCH] Avoid warning about mbAppendStr if lui support isn't enabled.

Panu Matilainen pmatilai at redhat.com
Tue Oct 10 04:41:14 UTC 2017


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 <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
> 

This and the two rpmlog format patches applied. Thanks,

	- Panu -


More information about the Rpm-maint mailing list