diff -Naur grep-2.14-original/lib/fts.c grep-2.14/lib/fts.c
--- grep-2.14-original/lib/fts.c	2012-02-26 14:01:23.001310720 +0000
+++ grep-2.14/lib/fts.c	2012-12-26 19:30:29.630718464 +0000
@@ -1278,6 +1278,7 @@
         nlink_t nlinks;
         bool nostat;
         size_t len, maxlen, new_len;
+	size_t max_entries;
         char *cp;
         int dir_fd;
         FTSENT *cur = sp->fts_cur;
@@ -1343,8 +1344,8 @@
            function.  But when no such function is specified, we can read
            entries in batches that are large enough to help us with inode-
            sorting, yet not so large that we risk exhausting memory.  */
-        size_t max_entries = (sp->fts_compar == NULL
-                              ? FTS_MAX_READDIR_ENTRIES : SIZE_MAX);
+        max_entries = (sp->fts_compar == NULL
+                       ? FTS_MAX_READDIR_ENTRIES : SIZE_MAX);
 
         /*
          * Nlinks is the number of possible entries of type directory in the
diff -Naur grep-2.14-original/lib/regcomp.c grep-2.14/lib/regcomp.c
--- grep-2.14-original/lib/regcomp.c	2012-07-03 12:54:55.058982400 +0000
+++ grep-2.14/lib/regcomp.c	2012-12-26 19:31:31.972029952 +0000
@@ -952,10 +952,10 @@
 internal_function
 init_word_char (re_dfa_t *dfa)
 {
-  dfa->word_ops_used = 1;
   int i = 0;
   int j;
   int ch = 0;
+  dfa->word_ops_used = 1;
   if (BE (dfa->map_notascii == 0, 1))
     {
       bitset_word_t bits0 = 0x00000000;
diff -Naur grep-2.14-original/src/dfasearch.c grep-2.14/src/dfasearch.c
--- grep-2.14-original/src/dfasearch.c	2012-08-07 15:01:53.033030144 +0000
+++ grep-2.14/src/dfasearch.c	2012-12-26 19:33:56.699138048 +0000
@@ -216,6 +216,7 @@
   int backref;
   regoff_t start;
   size_t len, best_len;
+  size_t off;
   struct kwsmatch kwsm;
   size_t i, ret_val;
   mb_len_map_t *map = NULL;
@@ -418,7 +419,7 @@
  success:
   len = end - beg;
  success_in_len:;
-  size_t off = beg - buf;
+  off = beg - buf;
   mb_case_map_apply (map, &off, &len);
   *match_size = len;
   ret_val = off;
diff -Naur grep-2.14-original/src/kwsearch.c grep-2.14/src/kwsearch.c
--- grep-2.14-original/src/kwsearch.c	2012-06-16 17:08:38.034078720 +0000
+++ grep-2.14/src/kwsearch.c	2012-12-26 19:36:28.265814016 +0000
@@ -39,9 +39,9 @@
                      ? mbtolower (pattern, &psize, &map)
                      : pattern);
 
-  kwsinit (&kwset);
-
   char const *beg = pat;
+
+  kwsinit (&kwset);
   do
     {
       char const *lim;
@@ -81,6 +81,7 @@
 {
   char const *beg, *try, *end, *mb_start;
   size_t len;
+  size_t off;
   char eol = eolbyte;
   struct kwsmatch kwsmatch;
   size_t ret_val;
@@ -100,6 +101,7 @@
   for (mb_start = beg = start_ptr ? start_ptr : buf; beg <= buf + size; beg++)
     {
       size_t offset = kwsexec (kwset, beg, buf + size - beg, &kwsmatch);
+      size_t mb_len;
       if (offset == (size_t) -1)
         goto failure;
       len = kwsmatch.size[0];
@@ -110,7 +112,7 @@
              one byte to ensure no infinite loop happens.  */
           mbstate_t s;
           memset (&s, 0, sizeof s);
-          size_t mb_len = mbrlen (mb_start, (buf + size) - (beg + offset), &s);
+          mb_len = mbrlen (mb_start, (buf + size) - (beg + offset), &s);
           if (mb_len == (size_t) -2)
             goto failure;
           beg = mb_start;
@@ -166,7 +168,7 @@
     --beg;
   len = end - beg;
  success_in_beg_and_len:;
-  size_t off = beg - buf;
+  off = beg - buf;
   mb_case_map_apply (map, &off, &len);
 
   *match_size = len;
diff -Naur grep-2.14-original/src/main.c grep-2.14/src/main.c
--- grep-2.14-original/src/main.c	2012-08-06 11:38:32.032768000 +0000
+++ grep-2.14/src/main.c	2012-12-26 19:39:22.737411072 +0000
@@ -460,6 +460,7 @@
   if (SEEK_HOLE != SEEK_END && usable_st_size (st))
     {
       off_t cur = bufsize;
+      off_t hole_start;
       if (O_BINARY || fd == STDIN_FILENO)
         {
           cur = lseek (fd, 0, SEEK_CUR);
@@ -468,7 +469,7 @@
         }
 
       /* Look for a hole after the current location.  */
-      off_t hole_start = lseek (fd, cur, SEEK_HOLE);
+      hole_start = lseek (fd, cur, SEEK_HOLE);
       if (0 <= hole_start)
         {
           if (lseek (fd, cur, SEEK_SET) < 0)
@@ -1860,6 +1861,7 @@
   size_t keycc, oldcc, keyalloc;
   int with_filenames;
   size_t cc;
+  struct stat tmp_stat;
   int opt, status, prepended;
   int prev_optind, last_recursive;
   intmax_t default_context;
@@ -2223,7 +2225,6 @@
   if (show_help)
     usage (EXIT_SUCCESS);
 
-  struct stat tmp_stat;
   if (fstat (STDOUT_FILENO, &tmp_stat) == 0 && S_ISREG (tmp_stat.st_mode))
     out_stat = tmp_stat;
 
diff -Naur grep-2.14-original/src/searchutils.c grep-2.14/src/searchutils.c
--- grep-2.14-original/src/searchutils.c	2012-06-16 17:08:38.034340864 +0000
+++ grep-2.14/src/searchutils.c	2012-12-26 19:32:59.044826624 +0000
@@ -80,6 +80,7 @@
   static mb_len_map_t *len_map;
   static size_t outalloc;
   size_t outlen, mb_cur_max;
+  size_t ombclen;
   mbstate_t is, os;
   const char *end;
   char *p;
@@ -133,7 +134,7 @@
       else
         {
           beg += mbclen;
-          size_t ombclen = wcrtomb (p, towlower ((wint_t) wc), &os);
+          ombclen = wcrtomb (p, towlower ((wint_t) wc), &os);
           *m = mbclen - ombclen;
           memset (m + 1, 0, ombclen - 1);
           m += ombclen;
