[ovs-dev] [PATCH] tests: Disable no-format-truncation warnings

Aaron Conole aconole at redhat.com
Thu Jul 13 15:07:18 UTC 2017


Timothy Redaelli <tredaelli at redhat.com> writes:

> test_snprintf function (tests/test-util.c) tests snprintf with shorter length,
> but this emit a warning on GCC 7.0 or later.
>
> This commit disables that warning on tests only.
>
> Signed-off-by: Timothy Redaelli <tredaelli at redhat.com>
> ---

As an alternative, would it make sense to modify the test in question to
use xasprintf?  Such function calls into ovs_snprintf on WIN32
platforms, anyway.

I think the warning itself is busted here anyway, so I guess it's such a
big deal, but sometimes I get scared to disable warnings.


More information about the dev mailing list