diff options
author | Wladimir J. van der Laan <laanwj@gmail.com> | 2012-04-15 12:53:14 +0200 |
---|---|---|
committer | Wladimir J. van der Laan <laanwj@gmail.com> | 2012-04-15 13:40:14 +0200 |
commit | 11cd41652519be7053b16847ffa2a7c7df64b95d (patch) | |
tree | bb7819178907e230a9b95a2f921bddbde50a96c3 /share | |
parent | 76d8170ce8b4714657f8defd791bd30fef1a8de4 (diff) |
fix warnings: unused variable 'XX' [-Wunused-variable]
Diffstat (limited to 'share')
-rwxr-xr-x | share/qt/extract_strings_qt.py | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/share/qt/extract_strings_qt.py b/share/qt/extract_strings_qt.py index 03d3a1ba37..771f28ab0a 100755 --- a/share/qt/extract_strings_qt.py +++ b/share/qt/extract_strings_qt.py @@ -54,9 +54,15 @@ child = Popen(['xgettext','--output=-','-n','--keyword=_'] + files, stdout=PIPE) messages = parse_po(out) f = open(OUT_CPP, 'w') -f.write('#include <QtGlobal>\n') -f.write('// Automatically generated by extract_strings.py\n') -f.write('static const char *bitcoin_strings[] = {') +f.write("""#include <QtGlobal> +// Automatically generated by extract_strings.py +#ifdef __GNUC__ +#define UNUSED __attribute__((unused)) +#else +#define UNUSED +#endif +""") +f.write('static const char UNUSED *bitcoin_strings[] = {') for (msgid, msgstr) in messages: if msgid != EMPTY: f.write('QT_TRANSLATE_NOOP("bitcoin-core", %s),\n' % ('\n'.join(msgid))) |