diff options
author | Steven Knight <knight@baldmt.com> | 2009-12-31 00:45:19 (GMT) |
---|---|---|
committer | Steven Knight <knight@baldmt.com> | 2009-12-31 00:45:19 (GMT) |
commit | 20a12bf165799f422fec4c6fda35f5c13f6fcdff (patch) | |
tree | e6029665b8c380454da1c9305e54bacaab4e2748 /QMTest | |
parent | 2c3932a6303e7cb1052ad3632f5afcee67852747 (diff) | |
download | SCons-20a12bf165799f422fec4c6fda35f5c13f6fcdff.zip SCons-20a12bf165799f422fec4c6fda35f5c13f6fcdff.tar.gz SCons-20a12bf165799f422fec4c6fda35f5c13f6fcdff.tar.bz2 |
Avoid GCC 4.4 warnings from the code generated by our dummy QT
moc and uic utilities by using fputs() instead of printf().
Diffstat (limited to 'QMTest')
-rw-r--r-- | QMTest/TestSCons.py | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/QMTest/TestSCons.py b/QMTest/TestSCons.py index 03bf552..bc1ba03 100644 --- a/QMTest/TestSCons.py +++ b/QMTest/TestSCons.py @@ -675,7 +675,8 @@ import getopt import sys import string import re -cmd_opts, args = getopt.getopt(sys.argv[1:], 'io:', []) +# -w and -z are fake options used in test/QT/QTFLAGS.py +cmd_opts, args = getopt.getopt(sys.argv[1:], 'io:wz', []) output = None impl = 0 opt_string = '' @@ -683,6 +684,7 @@ for opt, arg in cmd_opts: if opt == '-o': output = open(arg, 'wb') elif opt == '-i': impl = 1 else: opt_string = opt_string + ' ' + opt +output.write("/* mymoc.py%s */\\n" % opt_string) for a in args: contents = open(a, 'rb').read() a = string.replace(a, '\\\\', '\\\\\\\\') @@ -703,6 +705,7 @@ output_arg = 0 impl_arg = 0 impl = None source = None +opt_string = '' for arg in sys.argv[1:]: if output_arg: output = open(arg, 'wb') @@ -714,11 +717,14 @@ for arg in sys.argv[1:]: output_arg = 1 elif arg == "-impl": impl_arg = 1 + elif arg[0:1] == "-": + opt_string = opt_string + ' ' + arg else: if source: sys.exit(1) source = open(arg, 'rb') sourceFile = arg +output.write("/* myuic.py%s */\\n" % opt_string) if impl: output.write( '#include "' + impl + '"\\n' ) includes = re.findall('<include.*?>(.*?)</include>', source.read()) @@ -741,7 +747,7 @@ void my_qt_symbol(const char *arg); #include "../include/my_qobject.h" #include <stdio.h> void my_qt_symbol(const char *arg) { - printf( arg ); + fputs( arg, stdout ); } """) |