9a32b02b7625a606fd9c098f63e79cd5215343c1
hiram
  Tue Jan 14 11:16:48 2014 -0800
fixup potential use of unset variable and better localize variables refs #12209
diff --git src/hg/hgTablesTest/hgTablesTest.c src/hg/hgTablesTest/hgTablesTest.c
index b7cc41e..7685fe4 100644
--- src/hg/hgTablesTest/hgTablesTest.c
+++ src/hg/hgTablesTest/hgTablesTest.c
@@ -117,43 +117,43 @@
 
 void tablesTestLogOne(struct tablesTest *test, FILE *f)
 /* Log test result to file. */
 {
 int i;
 for (i=0; i<ArraySize(test->info); ++i)
     fprintf(f, "%s ", test->info[i]);
 fprintf(f, "%s\n", test->status->errMessage);
 }
 
 struct htmlPage *quickSubmit(struct htmlPage *basePage,
 	char *org, char *db, char *group, char *track, char *table,
 	char *testName, char *button, char *buttonVal)
 /* Submit page and record info.  Return NULL if a problem. */
 {
-struct tablesTest *test;
-struct qaStatus *qs;
-struct htmlPage *page;
+struct htmlPage *page = NULL;
 
 // don't get ahead of the botDelay
 sleep1000(5000);
 
 verbose(2, "quickSubmit(%p, %s, %s, %s, %s, %s, %s, %s, %s)\n",
 	basePage, naForNull(org), naForNull(db), naForNull(group), 
 	naForNull(track), naForNull(table), naForNull(testName), 
 	naForNull(button), naForNull(buttonVal));
 if (basePage != NULL)
     {
+    struct qaStatus *qs;
+    struct tablesTest *test;
     if (db != NULL)
 	htmlPageSetVar(basePage, NULL, "db", db);
     if (org != NULL)
 	htmlPageSetVar(basePage, NULL, "org", org);
     if (group != NULL)
         htmlPageSetVar(basePage, NULL, hgtaGroup, group);
     if (track != NULL)
         htmlPageSetVar(basePage, NULL, hgtaTrack, track);
     if (table != NULL)
         htmlPageSetVar(basePage, NULL, hgtaTable, table);
     qs = qaPageFromForm(basePage, basePage->forms, 
 	    button, buttonVal, &page);
     /* 
     if (page->forms != NULL)
         htmlFormPrint(page->forms, stdout);