Compile with GCC 7.x and -O3

Hi
I am trying to build an optimized firmware for my target using GCC 7.x
I get a compilation error because GCC prompt a warning in one package, this one:

usbip_host_driver.c: In function 'usbip_host_export_device:
usbip_host_driver.c:247:55: error: 'snprintf' output may be truncated before the last format character [-Werror=format-truncation=]

This is a bogus warning, so I would like to suppress it.
But I cannot figure out how do it!
According to include/package-default.mk it should be enough to add one environment variable, so I tried:

export EXTRA_CPPFLAGS="-Wno-format -Wno-format-truncation"

But I still get the error. How can I suppress it?
Thanks, bye