From 2250aaa9db1bce1d60526681cdc62338050e79bb Mon Sep 17 00:00:00 2001 From: "olafvdspek@gmail.com" Date: Mon, 21 May 2012 21:52:04 +0000 Subject: [PATCH] Fix G++ 4.7 issues --- src/ctemplate/template_string.h.in | 2 +- src/template_dictionary.cc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ctemplate/template_string.h.in b/src/ctemplate/template_string.h.in index 6fa999d..701c36c 100644 --- a/src/ctemplate/template_string.h.in +++ b/src/ctemplate/template_string.h.in @@ -337,7 +337,7 @@ class @ac_windows_dllexport@ StaticTemplateStringInitializer { // Don't use this. This is used only in auto-generated .varnames.h files. #define STS_INIT_WITH_HASH(name, str, hash) \ - { { str, sizeof(""str"")-1, hash } }; \ + { { str, sizeof("" str "")-1, hash } }; \ namespace ctemplate_sts_init { \ static const @ac_google_namespace@::StaticTemplateStringInitializer name##_init(&name); \ } diff --git a/src/template_dictionary.cc b/src/template_dictionary.cc index 517395a..78864d2 100644 --- a/src/template_dictionary.cc +++ b/src/template_dictionary.cc @@ -861,7 +861,7 @@ class TemplateDictionary::DictionaryPrinter { string GetDictNum(size_t index, size_t size) const { char buf[64]; // big enough for two ints - snprintf(buf, sizeof(buf), "%" PRIuS" of %" PRIuS, index, size); + snprintf(buf, sizeof(buf), "%" PRIuS " of %" PRIuS, index, size); return buf; }