Index: commands.c
===================================================================
--- commands.c	(revision b363d83e853174043a0471ddd8a28a4ef226df02)
+++ commands.c	(revision ad15610ead2550219224b67ce4c2d7da2819e4df)
@@ -2468,4 +2468,5 @@
   owl_message *m;
   owl_view *v;
+  char *cmd;
 
   v = owl_global_get_current_view(&g);
@@ -2486,5 +2487,5 @@
     return;
   }
-  char * cmd = owl_message_get_attribute_value(m, "yescommand");
+  cmd = owl_message_get_attribute_value(m, "yescommand");
   if(!cmd) {
     owl_function_error("No yes command!");
@@ -2501,4 +2502,5 @@
   owl_message *m;
   owl_view *v;
+  char *cmd;
 
   v = owl_global_get_current_view(&g);
@@ -2519,5 +2521,5 @@
     return;
   }
-  char * cmd = owl_message_get_attribute_value(m, "nocommand");
+  cmd = owl_message_get_attribute_value(m, "nocommand");
   if(!cmd) {
     owl_function_error("No no command!");
Index: filter.c
===================================================================
--- filter.c	(revision 535d68bc01fbedad4a7e0bbdbf8a4758fe2ce03f)
+++ filter.c	(revision ad15610ead2550219224b67ce4c2d7da2819e4df)
@@ -63,11 +63,11 @@
 static owl_filterelement * owl_filter_parse_primitive_expression(int argc, char **argv, int *next)
 {
+  owl_filterelement *fe, *op;
+  int i = 0, skip;
+
   if(!argc) return NULL;
 
-  owl_filterelement * fe = owl_malloc(sizeof(owl_filterelement));
-  owl_filterelement *op;
-
+  fe = owl_malloc(sizeof(owl_filterelement));
   owl_filterelement_create(fe);
-  int i = 0, skip;
 
   if(!strcasecmp(argv[i], "(")) {
@@ -118,5 +118,5 @@
 {
   int i = 0, skip;
-  owl_filterelement * op1 = NULL, * op2 = NULL;
+  owl_filterelement * op1 = NULL, * op2 = NULL, *tmp;
 
   op1 = owl_filter_parse_primitive_expression(argc-i, argv+i, &skip);
@@ -129,5 +129,5 @@
     op2 = owl_filter_parse_primitive_expression(argc-i-1, argv+i+1, &skip);
     if(!op2) goto err;
-    owl_filterelement * tmp = owl_malloc(sizeof(owl_filterelement));
+    tmp = owl_malloc(sizeof(owl_filterelement));
     if(!strcasecmp(argv[i], "and")) {
       owl_filterelement_create_and(tmp, op1, op2);
@@ -204,6 +204,7 @@
 int owl_filter_message_match(owl_filter *f, owl_message *m)
 {
+  int ret;
   if(!f->root) return 0;
-  int ret = owl_filterelement_match(f->root, m);
+  ret = owl_filterelement_match(f->root, m);
   if(f->polarity) ret = !ret;
   return ret;
@@ -305,7 +306,9 @@
 
 int owl_filter_regtest(void) {
-  owl_list_create(&(g.filterlist));
   int numfailed=0;
   owl_message m;
+  owl_filter f1, f2, f3, f4;
+
+  owl_list_create(&(g.filterlist));
   owl_message_init(&m);
   owl_message_set_type_zephyr(&m);
@@ -345,6 +348,4 @@
   TEST_FILTER("true and false or false", 0);
 
-  owl_filter f1, f2, f3, f4;
-
   owl_filter_init_fromstring(&f1, "f1", "class owl");
   owl_global_add_filter(&g, &f1);
Index: functions.c
===================================================================
--- functions.c	(revision 0ef0e8f01a44a8fcd6d94a0b2b52c24b0f7a5b12)
+++ functions.c	(revision ad15610ead2550219224b67ce4c2d7da2819e4df)
@@ -2801,4 +2801,5 @@
   owl_message *m;
   char *zperson, *filtname=NULL;
+  char *argv[1];
   
   v=owl_global_get_current_view(&g);
@@ -2859,5 +2860,4 @@
 
   /* pass it off to perl */
-  char *argv[1];
   if(type) {
     argv[0] = "-i";
Index: global.c
===================================================================
--- global.c	(revision b363d83e853174043a0471ddd8a28a4ef226df02)
+++ global.c	(revision ad15610ead2550219224b67ce4c2d7da2819e4df)
@@ -18,4 +18,5 @@
   struct hostent *hent;
   char hostname[MAXHOSTNAMELEN];
+  char *cd;
 
   g->malloced=0;
@@ -88,5 +89,5 @@
   g->confdir = NULL;
   g->startupfile = NULL;
-  char * cd = owl_sprintf("%s/%s", g->homedir, OWL_CONFIG_DIR);
+  cd = owl_sprintf("%s/%s", g->homedir, OWL_CONFIG_DIR);
   owl_global_set_confdir(g, cd);
   owl_free(cd);
Index: message.c
===================================================================
--- message.c	(revision 21f0a9d963c47a68ef721dd46a1fd1dec95a498f)
+++ message.c	(revision ad15610ead2550219224b67ce4c2d7da2819e4df)
@@ -27,8 +27,8 @@
 owl_fmtext_cache * owl_message_next_fmtext() /*noproto*/
 {
+    owl_fmtext_cache * f = fmtext_cache_next;
     if(fmtext_cache_next->message != NULL) {
         owl_message_invalidate_format(fmtext_cache_next->message);
     }
-    owl_fmtext_cache * f = fmtext_cache_next;
     fmtext_cache_next++;
     if(fmtext_cache_next - fmtext_cache == OWL_FMTEXT_CACHE_SIZE)
@@ -567,6 +567,7 @@
 
 int owl_message_is_answered(owl_message *m) {
+  char *q;
   if(!owl_message_is_question(m)) return 0;
-  char * q = owl_message_get_attribute_value(m, "question");
+  q = owl_message_get_attribute_value(m, "question");
   if(!q) return 0;
   return !strcmp(q, "answered");
Index: perlconfig.c
===================================================================
--- perlconfig.c	(revision f6b319cca5234c8b6dbdb43812ec2bb9483a6f26)
+++ perlconfig.c	(revision ad15610ead2550219224b67ce4c2d7da2819e4df)
@@ -137,4 +137,5 @@
   char *key,*val;
   HV * hash;
+  struct tm tm;
 
   hash = (HV*)SvRV(msg);
@@ -162,5 +163,4 @@
     } else if (!strcmp(key, "time")) {
       m->timestr = owl_strdup(val);
-      struct tm tm;
       strptime(val, "%a %b %d %T %Y", &tm);
       m->time = mktime(&tm);
@@ -445,4 +445,5 @@
   int i, count;
   char * ret = NULL;
+  SV *rv;
   STRLEN n_a;
   dSP;
@@ -467,5 +468,5 @@
     if(count != 1)
       croak("Perl command %s returned more than one value!", cmd->name);
-    SV * rv = POPs;
+    rv = POPs;
     if(SvTRUE(rv)) {
       ret = owl_strdup(SvPV(rv, n_a));
@@ -488,9 +489,9 @@
   SV *cb = (SV*)(e->cbdata);
   unsigned int n_a;
+  dSP;
+
   if(cb == NULL) {
     owl_function_error("Perl callback is NULL!");
   }
-
-  dSP;
 
   ENTER;
@@ -516,7 +517,7 @@
 void owl_perlconfig_mainloop()
 {
+  dSP;
   if (!owl_perlconfig_is_function("BarnOwl::Hooks::_mainloop_hook"))
     return;
-  dSP ;
   PUSHMARK(SP) ;
   call_pv("BarnOwl::Hooks::_mainloop_hook", G_DISCARD|G_EVAL);
Index: variable.c
===================================================================
--- variable.c	(revision 1cf3f8d3cf08ed3fb38d1c83459a1db140cb0d17)
+++ variable.c	(revision ad15610ead2550219224b67ce4c2d7da2819e4df)
@@ -974,4 +974,5 @@
   int numfailed=0;
   char buf[1024];
+  owl_variable * v;
 
   in_regtest = 1;
@@ -1027,6 +1028,4 @@
   FAIL_UNLESS("get enum 10", OWL_WEBBROWSER_NETSCAPE==owl_variable_get_int(&vd,"webbrowser"));
 
-  owl_variable * v;
-  
   owl_variable_dict_newvar_string(&vd, "stringvar", "", "", "testval");
   FAIL_UNLESS("get new string var", NULL != (v = owl_variable_get(&vd, "stringvar", OWL_VARIABLE_STRING)));
