about summary refs log tree commit diff
path: root/Src/params.c
diff options
context:
space:
mode:
Diffstat (limited to 'Src/params.c')
-rw-r--r--Src/params.c16
1 files changed, 2 insertions, 14 deletions
diff --git a/Src/params.c b/Src/params.c
index 054fb1f54..b2e889738 100644
--- a/Src/params.c
+++ b/Src/params.c
@@ -2705,30 +2705,18 @@ static void
 check_warn_create(Param pm, const char *pmtype)
 {
     Funcstack i;
-    const char *name;
 
     if (pm->level != 0 || (pm->node.flags & PM_SPECIAL))
 	return;
 
-    name = NULL;
     for (i = funcstack; i; i = i->prev) {
 	if (i->tp == FS_FUNC) {
 	    DPUTS(!i->name, "funcstack entry with no name");
-	    name = i->name;
+	    zwarn("%s parameter %s created globally in function %s",
+		  pmtype, pm->node.nam, i->name);
 	    break;
 	}
     }
-
-    if (name)
-    {
-	zwarn("%s parameter %s created globally in function %s",
-	      pmtype, pm->node.nam, name);
-    }
-    else
-    {
-	zwarn("%s parameter %s created globally in function",
-	      pmtype, pm->node.nam);
-    }
 }
 
 /**/