diff options
author | hjk <hjk@qt.io> | 2019-07-23 10:58:00 +0200 |
---|---|---|
committer | hjk <hjk@qt.io> | 2019-07-23 11:55:59 +0000 |
commit | 251287f0d35dd82e68dabed8214ef8af893aff91 (patch) | |
tree | a3ba843c1c23f4aea06bc01bf7ab0dd69d6fc741 /tests/manual | |
parent | 2b26eca80f9ebcdc2f1dc0d890a39a4fbc2d129c (diff) |
Avoid warning on empty expressions
For some reason, Q_UNUSED includes already a semicolon, adding one
on the user side creates an additional empty statement.
Change-Id: I9c5e8fac381345a60792cb75e2938fd53958d3b0
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Diffstat (limited to 'tests/manual')
-rw-r--r-- | tests/manual/debugger/simple/simple_test_app.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/manual/debugger/simple/simple_test_app.cpp b/tests/manual/debugger/simple/simple_test_app.cpp index 864e20d40a..1902dfe27c 100644 --- a/tests/manual/debugger/simple/simple_test_app.cpp +++ b/tests/manual/debugger/simple/simple_test_app.cpp @@ -423,7 +423,7 @@ class XX : virtual public Foo { public: XX() { } }; class Y : virtual public Foo { public: Y() { } }; -class D : public X, public Y { int diamond; D(){Q_UNUSED(diamond);} }; +class D : public X, public Y { int diamond; D(){Q_UNUSED(diamond);} } namespace peekandpoke { @@ -3408,7 +3408,7 @@ namespace lambda { std::string x; auto f = [&] () -> const std::string & { size_t z = x.size(); - Q_UNUSED(z); + Q_UNUSED(z) return x; }; auto c = f(); @@ -6633,7 +6633,7 @@ namespace bug5106 { class A5106 { public: - A5106(int a, int b) : m_a(a), m_b(b) {Q_UNUSED(m_a);Q_UNUSED(m_b);} + A5106(int a, int b) : m_a(a), m_b(b) {Q_UNUSED(m_a);Q_UNUSED(m_b)} virtual int test() { return 5; } private: int m_a, m_b; @@ -6642,7 +6642,7 @@ namespace bug5106 { class B5106 : public A5106 { public: - B5106(int c, int a, int b) : A5106(a, b), m_c(c) {Q_UNUSED(m_c);} + B5106(int c, int a, int b) : A5106(a, b), m_c(c) {Q_UNUSED(m_c)} virtual int test() { return 4; BREAK_HERE; } private: int m_c; @@ -7224,7 +7224,7 @@ template <class X> int ffff(X) int main(int argc, char *argv[]) { int z = ffff(3) + ffff(2.0); - Q_UNUSED(z); + Q_UNUSED(z) #if USE_GUILIB QApplication app(argc, argv); |