loplugin:oncevar

Change-Id: I070f06ed3195925e525066c6ba25a0bb01b824d0
This commit is contained in:
Stephan Bergmann 2017-06-30 11:06:58 +02:00
parent 83634c9d11
commit c724093edb

View File

@ -755,11 +755,11 @@ RequestHandler::Status RequestHandler::Enable(bool ipc)
}
enum class Kind { Pipe, Dbus };
Kind kind = Kind::Pipe;
Kind kind;
#if ENABLE_DBUS
if (std::getenv("LIBO_FLATPAK") != nullptr) {
kind = Kind::Dbus;
}
kind = std::getenv("LIBO_FLATPAK") != nullptr ? Kind::Dbus : Kind::Pipe;
#else
kind = Kind::Pipe;
#endif
rtl::Reference<IpcThread> thread;
Status stat = Status(); // silence bogus potentially-uninitialized warnings