On Tue, 1 Oct 2019 11:10:23 +0000 Viacheslav Ovsiienko <viachesl...@mellanox.com> wrote:
> +#if defined(RTE_TOOLCHAIN_GCC) && (GCC_VERSION >= 40600) > +#pragma GCC diagnostic push > #pragma GCC diagnostic ignored "-Wformat-nonliteral" > +#endif > + /* Use safe format to check maximal buffer length. */ > while (fscanf(file, format, ifname) == 1) { > -#pragma GCC diagnostic error "-Wformat-nonliteral" > +#if defined(RTE_TOOLCHAIN_GCC) && (GCC_VERSION >= 40600) > +#pragma GCC diagnostic pop > +#endif This is messy, is there not a better way to do this?