[CRIU][PATCH] zdtm: It's need add format to fprintf

Andrey Wagin avagin at gmail.com
Mon Oct 1 09:11:27 EDT 2012


Acked-by: Andrey Vagin <avagin at openvz.com>

2012/10/1 vkonyashkin <vkonyashkin at parallels.com>:
> It's need add format to fprintf to avoid following error in Ubuntu 12.04:
> msg.c:59:2: error: format not a string literal and no format arguments [-Werror=format-security]
>
> Signed-off-by: Victor Konyashkin  <vkonyashkin at parallels.com>
> ---
>  test/zdtm/lib/msg.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/test/zdtm/lib/msg.c b/test/zdtm/lib/msg.c
> index 17a298e..8a80ae2 100644
> --- a/test/zdtm/lib/msg.c
> +++ b/test/zdtm/lib/msg.c
> @@ -56,5 +56,5 @@ void test_msg(const char *format, ...)
>         off += vsnprintf(buf + off, sizeof(buf) - off, format, arg);
>         va_end(arg);
>
> -       fprintf(stderr, buf);
> +       fprintf(stderr, "%s", buf);
>  }
> --
> 1.5.2.2
>
> _______________________________________________
> CRIU mailing list
> CRIU at openvz.org
> https://openvz.org/mailman/listinfo/criu


More information about the CRIU mailing list