[libgsf] Compilation: attempt working around another clang false positive.



commit e11113512411d0f4f9f1178f1f46e3fa399f52ef
Author: Morten Welinder <terra gnome org>
Date:   Mon Jan 7 14:36:52 2013 -0500

    Compilation: attempt working around another clang false positive.

 ChangeLog            |    3 +++
 gsf/gsf-infile-zip.c |    3 +++
 2 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 23c4a1f..8a99f36 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2013-01-07  Morten Welinder  <terra gnome org>
 
+	* gsf/gsf-infile-zip.c (zip_child_init): Attempt working around
+	another clang false positive.
+
 	* gsf/gsf-input-memory.c (gsf_input_memory_new_clone): For around
 	a clang false positive.
 
diff --git a/gsf/gsf-infile-zip.c b/gsf/gsf-infile-zip.c
index 549dacf..4649c46 100644
--- a/gsf/gsf-infile-zip.c
+++ b/gsf/gsf-infile-zip.c
@@ -418,6 +418,9 @@ zip_child_init (GsfInfileZip *child, GError **errmsg)
 		return TRUE;
 	}
 
+	/* Throw clang a bone.  */
+	g_assert (data != NULL);
+
 	name_len =   GSF_LE_GET_GUINT16 (data + ZIP_FILE_HEADER_NAME_SIZE);
 	extras_len = GSF_LE_GET_GUINT16 (data + ZIP_FILE_HEADER_EXTRAS_SIZE);
 



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