Initialize conflictSeverity variable.
authorgregor herrmann <gregoa@debian.org>
Sun, 22 Jan 2017 18:49:39 +0000 (19:49 +0100)
committergregor herrmann <gregoa@debian.org>
Sun, 22 Jan 2017 18:49:39 +0000 (19:49 +0100)
Compiler warning with -Wmaybe-uninitialized.

src/mvc/delegate.cpp

index c693929..283f2c3 100644 (file)
@@ -65,6 +65,7 @@ void Delegate::paint(QPainter *painter, const QStyleOptionViewItem &option, cons
         // determine severity of conflict
         Favourite eventTimeConflict = event->timeConflict(); // cache value as event->timeConflict is expensive
         enum ConflictSeverity {csNone, csWeak, csStrong} conflictSeverity;
+        conflictSeverity = csNone;
         switch (event->favourite()) {
             case Favourite_strong:
                 conflictSeverity = (eventTimeConflict == Favourite_strong) ? csStrong : csNone;