From 213ac201795491fcd509746024c466b6427ac81c Mon Sep 17 00:00:00 2001 From: Matthew Fernandez Date: Fri, 4 Nov 2022 19:37:23 -0700 Subject: [PATCH] smyrna: remove unreachable code in 'create_column' This function is only ever called into with non-null pointers. --- cmd/smyrna/tvnodes.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/smyrna/tvnodes.c b/cmd/smyrna/tvnodes.c index 75b77ffb4..92d6ae1ba 100644 --- a/cmd/smyrna/tvnodes.c +++ b/cmd/smyrna/tvnodes.c @@ -8,6 +8,7 @@ * Contributors: Details at https://graphviz.org *************************************************************************/ +#include #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: -- 2.40.0