Suppress an uninitialized-variable warning (not all versions of gcc
authorTom Lane <tgl@sss.pgh.pa.us>
Wed, 1 Oct 2008 14:59:23 +0000 (14:59 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Wed, 1 Oct 2008 14:59:23 +0000 (14:59 +0000)
complain here, but some do)

src/backend/storage/freespace/freespace.c

index 5888362d48fd9e1b4b646d34423834ceed6794a6..17f733fe1f7196e9c06d41de4014b606570053c3 100644 (file)
@@ -612,7 +612,7 @@ fsm_search(Relation rel, uint8 min_cat)
        {
                int slot;
                Buffer buf;
-               uint8 max_avail;
+               uint8 max_avail = 0;
 
                /*
                 * Read the FSM page. The root page is created if it doesn't exist
@@ -634,10 +634,7 @@ fsm_search(Relation rel, uint8 min_cat)
                        UnlockReleaseBuffer(buf);
                }
                else
-               {
                        slot = -1;
-                       max_avail = 0;
-               }
 
                if (slot != -1)
                {