projects
/
platform
/
upstream
/
glib.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
dab2097
)
notification: Add an assertion to clarify
author
Matthias Clasen
<mclasen@redhat.com>
Fri, 17 Jul 2015 20:46:26 +0000
(16:46 -0400)
committer
Matthias Clasen
<mclasen@redhat.com>
Fri, 17 Jul 2015 20:46:26 +0000
(16:46 -0400)
Coverity doesn't see that g_enum_get_value will never return
NULL here since we always pass it a valid enum value. Help
it along with an assertion.
gio/gnotification.c
patch
|
blob
|
history
diff --git
a/gio/gnotification.c
b/gio/gnotification.c
index 53c5c6ba9ae3b2313c8d21050fe69935451d7593..2cf03cf04e1f0cac60bcd79f9e4ac211b2aa53a4 100644
(file)
--- a/
gio/gnotification.c
+++ b/
gio/gnotification.c
@@
-714,6
+714,7
@@
g_notification_get_priority_nick (GNotification *notification)
enum_class = g_type_class_ref (G_TYPE_NOTIFICATION_PRIORITY);
value = g_enum_get_value (enum_class, g_notification_get_priority (notification));
+ g_assert (value != NULL);
nick = g_variant_new_string (value->value_nick);
g_type_class_unref (enum_class);