code issue: notify-manager.c: condition is always false
cppcheck 2.6 warning:
src/notifications/notify-manager.c:467:22: style: Condition 'urgency==PHOSH_NOTIFICATION_URGENCY_CRITICAL' is always false [knownConditionTrueFalse]
} else if (urgency == PHOSH_NOTIFICATION_URGENCY_CRITICAL) {
^
src/notifications/notify-manager.c:403:38: note: Assignment 'urgency=PHOSH_NOTIFICATION_URGENCY_NORMAL', assigned value is 1
PhoshNotificationUrgency urgency = PHOSH_NOTIFICATION_URGENCY_NORMAL;
^
src/notifications/notify-manager.c:467:22: note: Condition 'urgency==PHOSH_NOTIFICATION_URGENCY_CRITICAL' is always false
} else if (urgency == PHOSH_NOTIFICATION_URGENCY_CRITICAL) {
^
the variable urgency
have always the value PHOSH_NOTIFICATION_URGENCY_NORMAL
in the function handle_notify
the condition else if (urgency == PHOSH_NOTIFICATION_URGENCY_CRITICAL)
is useless because is always false