[glib] Silence a compiler warning



commit 25a797fa25e17607a7b3618d3d098004b2be1cc8
Author: Matthias Clasen <mclasen redhat com>
Date:   Tue Jun 14 10:16:35 2011 -0400

    Silence a compiler warning
    
    Even though we are confident the filename will always
    end in .gmarkup, the compiler doesn't know that...

 glib/tests/markup-parse.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/glib/tests/markup-parse.c b/glib/tests/markup-parse.c
index a1fbf38..fa45b77 100644
--- a/glib/tests/markup-parse.c
+++ b/glib/tests/markup-parse.c
@@ -216,7 +216,8 @@ get_expected_filename (const gchar *filename)
 
   f = g_strdup (filename);
   p = strstr (f, ".gmarkup");
-  *p = 0;
+  if (p)
+    *p = 0;
   expected = g_strconcat (f, ".expected", NULL);
   g_free (f);
 



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