summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/eglfs/qeglfshooks_stub.cpp
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2013-02-24 09:14:20 -0800
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-02-26 22:01:27 +0100
commit1b76cf017427a98bf4487f3cf576611d82097539 (patch)
treef7348ce5e47854ea1e608a873b19b4c6889e5a41 /src/plugins/platforms/eglfs/qeglfshooks_stub.cpp
parentbc5170f274572a4b262569c12d5d3c6ef892aaf2 (diff)
EGLFS: Replace the global static 'hooks' variable with a function
Having a global static variable in a header is a poor choice to start with. All .cpp including that header must use that variable or the compiler will warn of an unused static. Second, for the case of platform hooks, it's possible that it is reading the value of a variable that isn't initialised yet. Change-Id: Id823c2be9cfededb9c31fb76a9080d4122577ca4 Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
Diffstat (limited to 'src/plugins/platforms/eglfs/qeglfshooks_stub.cpp')
-rw-r--r--src/plugins/platforms/eglfs/qeglfshooks_stub.cpp2
1 files changed, 0 insertions, 2 deletions
diff --git a/src/plugins/platforms/eglfs/qeglfshooks_stub.cpp b/src/plugins/platforms/eglfs/qeglfshooks_stub.cpp
index 6c036cd680..5298eb47ea 100644
--- a/src/plugins/platforms/eglfs/qeglfshooks_stub.cpp
+++ b/src/plugins/platforms/eglfs/qeglfshooks_stub.cpp
@@ -62,8 +62,6 @@ const char *QEglFSHooks::fbDeviceName() const
void QEglFSHooks::platformInit()
{
- Q_UNUSED(hooks);
-
framebuffer = qt_safe_open(fbDeviceName(), O_RDONLY);
if (framebuffer == -1)