[PATCH v2 4/7] examples: re-enable format truncation warning

Stephen Hemminger
2025-11-11T22:19:26Z

There were several hidden bugs in examples because format
truncation warning was disabled.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
examples/meson.build | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/examples/meson.build b/examples/meson.build
index 8e8968a1fa..25d9c88457 100644
--- a/examples/meson.build
+++ b/examples/meson.build
@@ -78,10 +78,9 @@ else
examples = get_option('examples').split(',')
allow_skips = false # error out if we can't build a requested app
endif
+
default_cflags = machine_args
-if cc.has_argument('-Wno-format-truncation')
- default_cflags += '-Wno-format-truncation'
-endif
+
default_ldflags = dpdk_extra_ldflags
if get_option('default_library') == 'static' and not is_windows
default_ldflags += ['-Wl,--export-dynamic']
--
2.51.0