[coreboot-gerrit] New patch to review for coreboot: cbfstool: Fix kv_pair on Windows

Stefan Reinauer (stefan.reinauer@coreboot.org) gerrit at coreboot.org
Sat Jul 4 20:32:56 CEST 2015


Stefan Reinauer (stefan.reinauer at coreboot.org) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/10793

-gerrit

commit c8ff7d447dbb7babc90bdfc266280780ba672334
Author: Stefan Reinauer <stefan.reinauer at coreboot.org>
Date:   Sat Jul 4 11:28:03 2015 -0700

    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 <stefan.reinauer at coreboot.org>
    Signed-off-by: Scott Duplichan <scott at notabs.org>
---
 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 7024dd3..1185a08 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



More information about the coreboot-gerrit mailing list