]> granicus.if.org Git - postgresql/commitdiff
Silence benign warnings from clang version 3.0-6ubuntu3.
authorKevin Grittner <kgrittn@postgresql.org>
Thu, 7 Nov 2013 22:35:43 +0000 (16:35 -0600)
committerKevin Grittner <kgrittn@postgresql.org>
Thu, 7 Nov 2013 22:35:43 +0000 (16:35 -0600)
contrib/pg_standby/pg_standby.c
src/backend/utils/cache/catcache.c

index a3f40fbe61aa3da876414da8e6a640f47688b193..059c820527994ee3409c0d0c10dfd7dbbd516842 100644 (file)
@@ -345,7 +345,7 @@ SetWALFileNameForCleanup(void)
        if (keepfiles > 0)
        {
                sscanf(nextWALFileName, "%08X%08X%08X", &tli, &log, &seg);
-               if (tli > 0 && log >= 0 && seg > 0)
+               if (tli > 0 && seg > 0)
                {
                        log_diff = keepfiles / MaxSegmentsPerLogFile;
                        seg_diff = keepfiles % MaxSegmentsPerLogFile;
index c467f11ac8bb6cca385910c050b13d33e94cb258..89e63258d287bcb8d6aebe3fa7a77e5340b4010f 100644 (file)
@@ -566,8 +566,9 @@ AtEOXact_CatCache(bool isCommit)
                        /* Check CatCLists */
                        dlist_foreach(iter, &ccp->cc_lists)
                        {
-                               CatCList   *cl = dlist_container(CatCList, cache_elem, iter.cur);
+                               CatCList   *cl;
 
+                               cl = dlist_container(CatCList, cache_elem, iter.cur);
                                Assert(cl->cl_magic == CL_MAGIC);
                                Assert(cl->refcount == 0);
                                Assert(!cl->dead);
@@ -580,8 +581,9 @@ AtEOXact_CatCache(bool isCommit)
 
                                dlist_foreach(iter, bucket)
                                {
-                                       CatCTup    *ct = dlist_container(CatCTup, cache_elem, iter.cur);
+                                       CatCTup    *ct;
 
+                                       ct = dlist_container(CatCTup, cache_elem, iter.cur);
                                        Assert(ct->ct_magic == CT_MAGIC);
                                        Assert(ct->refcount == 0);
                                        Assert(!ct->dead);