[dia] [scan-build] Branch condition evaluates to garbage value



commit 0c9bc8599ee5bc98ea4b423d1237a9e4a6632ec6
Author: Hans Breuer <hans breuer org>
Date:   Sun Nov 28 14:19:41 2010 +0100

    [scan-build] Branch condition evaluates to garbage value
    
    The clipboard_image_handler used an unitialized pointer
    NULL check to give a warning message (or most probably not)

 app/commands.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/app/commands.c b/app/commands.c
index fdcb10e..88942be 100644
--- a/app/commands.c
+++ b/app/commands.c
@@ -236,7 +236,7 @@ received_clipboard_image_handler(GtkClipboard *clipboard,
   DDisplay *ddisp = (DDisplay *)data;
   Diagram  *dia = ddisp->diagram;
   GList *list = dia->data->selected;
-  ObjectChange *change;
+  ObjectChange *change = NULL;
 
   if (!pixbuf) {
     message_error (_("No image from Clipboard to paste."));



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]