diff options
author | Milan Crha <mcrha@redhat.com> | 2013-11-15 16:06:57 +0800 |
---|---|---|
committer | Milan Crha <mcrha@redhat.com> | 2013-11-15 16:06:57 +0800 |
commit | 570c6374806d0f1ec59cf7a72543efe6b5b637be (patch) | |
tree | c5390b1fcb73f30c28bf37168add9bf1dc622b42 /calendar/gui/ea-gnome-calendar.c | |
parent | 1be51f232560f864ba8795a38e55d472b5b0e2b3 (diff) | |
download | gsoc2013-evolution-570c6374806d0f1ec59cf7a72543efe6b5b637be.tar gsoc2013-evolution-570c6374806d0f1ec59cf7a72543efe6b5b637be.tar.gz gsoc2013-evolution-570c6374806d0f1ec59cf7a72543efe6b5b637be.tar.bz2 gsoc2013-evolution-570c6374806d0f1ec59cf7a72543efe6b5b637be.tar.lz gsoc2013-evolution-570c6374806d0f1ec59cf7a72543efe6b5b637be.tar.xz gsoc2013-evolution-570c6374806d0f1ec59cf7a72543efe6b5b637be.tar.zst gsoc2013-evolution-570c6374806d0f1ec59cf7a72543efe6b5b637be.zip |
Fix/mute issues found by Coverity scan
This makes the code free of Coverity scan issues.
It is sometimes quite pedantic and expects/suggests some
coding habits, thus certain changes may look weird, but for a good
thing, I hope. The code is also tagged with Coverity scan
suppressions, to keep the code as is and hide the warning too.
Also note that Coverity treats g_return_if_fail(), g_assert() and
similar macros as unreliable, and it's true these can be disabled
during the compile time, thus it brings in other set of 'weird'
changes.
Diffstat (limited to 'calendar/gui/ea-gnome-calendar.c')
-rw-r--r-- | calendar/gui/ea-gnome-calendar.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/calendar/gui/ea-gnome-calendar.c b/calendar/gui/ea-gnome-calendar.c index 7edf52de7d..9fd48565a9 100644 --- a/calendar/gui/ea-gnome-calendar.c +++ b/calendar/gui/ea-gnome-calendar.c @@ -162,8 +162,11 @@ ea_gnome_calendar_get_label_description (GnomeCalendar *gcal) view_type = gnome_calendar_get_view (gcal); calendar_view = gnome_calendar_get_calendar_view (gcal, view_type); - e_calendar_view_get_visible_time_range ( - calendar_view, &start_time, &end_time); + if(!e_calendar_view_get_visible_time_range ( + calendar_view, &start_time, &end_time)) { + g_warn_if_reached (); + return NULL; + } start_tt = icaltime_from_timet_with_zone (start_time, FALSE, zone); start_tm.tm_year = start_tt.year - 1900; |