]> granicus.if.org Git - graphviz/commitdiff
smyrna: remove unreachable code in 'create_column'
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Sat, 5 Nov 2022 02:37:23 +0000 (19:37 -0700)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Thu, 10 Nov 2022 03:50:53 +0000 (19:50 -0800)
This function is only ever called into with non-null pointers.

cmd/smyrna/tvnodes.c

index 75b77ffb46be8179f5a9b2f32026fdda3032db0f..92d6ae1bac04737eb862a0ddbb2a0eecb7716959 100644 (file)
@@ -8,6 +8,7 @@
  * Contributors: Details at https://graphviz.org
  *************************************************************************/
 
+#include <assert.h>
 #include "tvnodes.h"
 #include "viewport.h"
 #include "topviewfuncs.h"
@@ -254,8 +255,7 @@ static GtkTreeStore *update_tree_store(GtkTreeStore * store, int ncolumns,
 
 static void create_column(gridCol * c, GtkTreeView * tree, int id)
 {
-    if (!c)
-       return;
+    assert(c != NULL);
     switch (c->type) {
     case G_TYPE_STRING:
     case G_TYPE_INT: