Fix warning in recently-added testlib snippet
Amends commit fa296ee1dc to implement
MyObject::startup(), mark it void (its return was ignored) and flag
its static wrapper as [[maybe_unused]] to calm a compiler warning.
As a drive-by, fix indentation of the class definition.
Change-Id: I3918bf8a4625a7e2b4e6d4e0cbfa68a337115865
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
bb10
parent
892448b6e0
commit
d6dacfecb1
|
|
@ -5,9 +5,9 @@
|
|||
// dummy class
|
||||
class MyObject
|
||||
{
|
||||
public:
|
||||
int isReady();
|
||||
bool startup();
|
||||
public:
|
||||
int isReady();
|
||||
void startup() {}
|
||||
};
|
||||
|
||||
// dummy function
|
||||
|
|
@ -27,7 +27,7 @@ int MyObject::isReady()
|
|||
return 1;
|
||||
}
|
||||
|
||||
static bool startup()
|
||||
[[maybe_unused]] static bool startup()
|
||||
{
|
||||
//! [2]
|
||||
MyObject obj;
|
||||
|
|
|
|||
Loading…
Reference in New Issue