From 19ba110c2d04452553b9e07d910ccf6458be4f9b Mon Sep 17 00:00:00 2001 From: Stefan Reinauer Date: Sat, 4 Jul 2015 11:28:03 -0700 Subject: [PATCH] cbfstool: Fix kv_pair on Windows On Windows systems the archetype printf defaults to ms_printf instead of gnu_printf. Keep the archetype print for all non- Windows compiles to not break compatibility with other systems out there. Change-Id: Iad8441f4dc814366176646f6a7a5df653fda4c15 Signed-off-by: Stefan Reinauer Signed-off-by: Scott Duplichan Reviewed-on: http://review.coreboot.org/10793 Tested-by: build bot (Jenkins) --- util/cbfstool/flashmap/kv_pair.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/util/cbfstool/flashmap/kv_pair.h b/util/cbfstool/flashmap/kv_pair.h index 7024dd3061..1185a08d52 100644 --- a/util/cbfstool/flashmap/kv_pair.h +++ b/util/cbfstool/flashmap/kv_pair.h @@ -108,7 +108,11 @@ extern struct kv_pair *kv_pair_add_bool(struct kv_pair *kv_list, */ extern struct kv_pair *kv_pair_fmt(struct kv_pair *kv_list, const char *kv_key, const char *format, ...) +#if defined(_WIN32) || (_WIN64) + __attribute__((format(gnu_printf, 3, 4))); +#else __attribute__((format(printf, 3, 4))); +#endif /* * kv_pair_free - clean a key=value pair list