$NetBSD: patch-ak,v 1.1 2005/03/16 18:32:50 rillig Exp $ gcc-2.95.3 cannot handle declarations intermixed with code. --- app/fileops.c.orig Tue Nov 23 12:58:14 2004 +++ app/fileops.c Wed Mar 16 18:29:30 2005 @@ -2021,6 +2021,7 @@ file_temp_name(char *extension) static gint pid; GString *s = g_string_new (NULL); + char *file_name; if (id == 0) { pid = getpid(); @@ -2030,8 +2031,8 @@ file_temp_name(char *extension) id++, extension); - char *file_name = strdup(s->str); - g_string_free (s, FALSE); + file_name = strdup(s->str); /* FIXME: possible null pointer access */ + g_string_free (s, FALSE); /* FIXME: memory leak */ return file_name; }