aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/print.c
diff options
context:
space:
mode:
authorMilan Crha <mcrha@redhat.com>2013-11-15 16:06:57 +0800
committerMilan Crha <mcrha@redhat.com>2013-11-15 16:06:57 +0800
commit570c6374806d0f1ec59cf7a72543efe6b5b637be (patch)
treec5390b1fcb73f30c28bf37168add9bf1dc622b42 /calendar/gui/print.c
parent1be51f232560f864ba8795a38e55d472b5b0e2b3 (diff)
downloadgsoc2013-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/print.c')
-rw-r--r--calendar/gui/print.c14
1 files changed, 3 insertions, 11 deletions
diff --git a/calendar/gui/print.c b/calendar/gui/print.c
index 13f195c2b7..c902a1c4e7 100644
--- a/calendar/gui/print.c
+++ b/calendar/gui/print.c
@@ -1654,8 +1654,10 @@ print_day_details (GtkPrintContext *context,
/* this ugly thing is here only to get rid of compiler warning
* about unused 'jump_xpm_focused' */
- if (pixbuf)
+ if (pixbuf) {
+ /* coverity[dead_error_line] */
xpm = (const gchar **) jump_xpm_focused;
+ }
pixbuf = gdk_pixbuf_new_from_xpm_data (xpm);
}
@@ -2003,11 +2005,6 @@ print_week_event (GtkPrintContext *context,
if (!pixbuf) {
const gchar **xpm = (const gchar **) jump_xpm;
- /* this ugly thing is here only to get rid of compiler warning
- * about unused 'jump_xpm_focused' */
- if (pixbuf)
- xpm = (const gchar **) jump_xpm_focused;
-
pixbuf = gdk_pixbuf_new_from_xpm_data (xpm);
}
@@ -2840,11 +2837,6 @@ print_work_week_day_details (GtkPrintContext *context,
if (!pixbuf) {
const gchar **xpm = (const gchar **) jump_xpm;
- /* this ugly thing is here only to get rid of compiler warning
- * about unused 'jump_xpm_focused' */
- if (pixbuf)
- xpm = (const gchar **) jump_xpm_focused;
-
pixbuf = gdk_pixbuf_new_from_xpm_data (xpm);
}